Re: [R] package(moments) issue

2020-10-15 Thread Bill Dunlap
Another bad case is > moments::anscombe.test(rep(c(1,1.1),length=35)) Error in if (pval > 1) pval <- 2 - pval : missing value where TRUE/FALSE needed I haven't checked the formulas carefully, but I suspect the problem is from taking the cube root of a negative number in z <- (1

Re: [R] package(moments) issue

2020-10-15 Thread Bill Dunlap
moments::anscombe.test(x) does give errors when x has too few values or if all the values in x are the same > moments::anscombe.test(c(1,2,6)) Error in if (pval > 1) pval <- 2 - pval : missing value where TRUE/FALSE needed > moments::anscombe.test(c(2,2,2,2,2,2,2,2)) Error in if (pval > 1) pval

Re: [R] Logreturn variance in Heston model

2020-10-15 Thread David Winsemius
I'm sure I don't know the answer, but I'll hazard a guess why no one has responded in 3 hours. Generally persons submit question to Rhelp with some code and data (or at least a description of the data). Questions about theory are considered off-topic although sometimes addressed if there seems

[R] package(moments) issue

2020-10-15 Thread Sania Wadud
Hi all, While running the anscombe.test in R, I'm getting an error of *Error in if (pval > 1) pval <- 2 - pval : missing value where TRUE/FALSE needed* for a few time series columns whereas for most of the series the function is working fine. I have checked for those specific columns for missing

[R] Logreturn variance in Heston model

2020-10-15 Thread Barbara Rogo via R-help
I have to calculate the logreturn variance in the Heston model. How can I do? Do you know some function that calculates it? Thank you Barbara -- Le informazioni contenute in questo messaggio di posta elettronica sono strettamente

Re: [R] Dplyr question

2020-10-15 Thread Dr Eberhard W Lisse
This is well described in the manual. Sounds like homework... el On 15/10/2020 12:39, Nico Gutierrez wrote: > Hi All, > > Trying to get familiar with dplyr so I have a basic question: > > How to summarise sum(Values) per species, maintaining Code column (each > species has a Code): > >

[R] Dplyr question

2020-10-15 Thread Nico Gutierrez
Hi All, Trying to get familiar with dplyr so I have a basic question: How to summarise sum(Values) per species, maintaining Code column (each species has a Code): Species Values Code 1Acanthocybium solandri33