[R] Help regarding tersvirta.test
Aravind R.N
aravindrn at gmail.com
Mon Jul 11 19:43:50 CEST 2011
Sorry, I had the wrong version of R.
Thanks for the help.
Regards,
Aravind
On Mon, Jul 11, 2011 at 8:14 AM, Dennis Murphy <djmuser at gmail.com> wrote:
> Hi:
>
> Works for me:
>
>> library(tseries)
> Loading required package: quadprog
> Loading required package: zoo
>
> ‘tseries’ version: 0.10-25
>
> ‘tseries’ is a package for time series analysis and computational
> finance.
>
> See ‘library(help="tseries")’ for details.
>> x<- as.ts(rnorm(1000))
>> str(x)
> Time-Series [1:1000] from 1 to 1000: -2.221 0.183 0.381 -0.263 0.19 ...
>> terasvirta.test(x)
>
> Teraesvirta Neural Network Test
>
> data: x
> X-squared = 0.8622, df = 2, p-value = 0.6498
>
>
> Did you load the tseries package before trying to call the function?
> If so, perhaps you need to upgrade your R version and/or your version
> of the tseries package.
>
>> sessionInfo()
> R version 2.13.1 (2011-07-08)
> Platform: x86_64-pc-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=English_United States.1252
> [2] LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252
> [4] LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets grid methods
> [8] base
>
> other attached packages:
> [1] tseries_0.10-25 zoo_1.6-5 quadprog_1.5-4 ismev_1.36
> [5] sos_1.3-1 brew_1.0-6 lattice_0.19-30 ggplot2_0.8.9
> [9] proto_0.3-9.2 reshape_0.8.4 plyr_1.5.2
>
> loaded via a namespace (and not attached):
> [1] tools_2.13.1
>
>
> Dennis
>
>
> On Sun, Jul 10, 2011 at 3:17 PM, Aravind R.N <aravindrn at gmail.com> wrote:
>> Hi,
>>
>> I tried running the function terasvirta.test in the package tseries
>> for a univariate tseries object.
>>
>> For eg.
>>
>> x<- as.ts(rnorm(1000))
>> terasvirta.test(x)
>>
>> I get the following error
>> Error in as.matrix(y) : argument "y" is missing, with no default
>>
>> The function seems to expect a default y argument for regressing. The
>> package source contains a function as mentioned below
>>
>> terasvirta.test.ts <-
>> function(x, lag = 1, type = c("Chisq", "F"), scale = TRUE, ...)
>>
>> When i try to call this , it gives an error sating function not available.
>>
>> Please do help. Thanks
>> --
>>
>> Thanks and Regards,
>> Aravind Nadarajan
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
--
Thanks and Regards,
Aravind Nadarajan
More information about the R-help
mailing list