[R] I want to create an object to use for the plot command
David Winsemius
dwinsemius at comcast.net
Sun Mar 20 00:35:27 CET 2011
On Mar 19, 2011, at 7:02 PM, AOLeary wrote:
> I'm using the TSA package (along with all prerequisites) to do some
> GARCH
> work and for some reason, something which used to work for me has
> decided to
> up and stop. The code is as follows, after loading the package:
>
> "
> gs <- garch.sim(alpha=c(1.9,0.1), beta=c(0.700001, -0.0800003,
> -0.016),rnd =
> rnorm, n = 400, ntrans=500)
>
> gs1 <- garch.sim(alpha=c(1.9,0.1), beta=c(0.7, -0.08, -0.016),rnd =
> rnorm, n
> = 400, ntrans=500)
>
> gts=ts(gs)
>
> gts1=ts(gs1)
>
> dgts=gts1-gts
>
> test <- garch(dgts, order=c(0,0))
>
> plot(test)
> "
>
> However, I get the following error:
Actually you failed to note that you got an earlier error from the
garch() function:
Error in sigt[1:max(order[1], order[2])] <- rep.int(NA, max(order[1], :
replacement has length zero
Which raises the question... what does it mean to specify a GARCH
model of order c(0,0)?
--
David.
>
> "
> Error in plot(test) : object 'test' not found
> "
>
> What's extra annoying is that I had been using this type of code
> before and
> it was working fine, I honestly don't know what the problem is, I've
> used R
> reasonable extensively before but never with these packages so I'm
> not sure
> what I might have done wrong.
>
> If anyone could take the time to help me out, I'd really appreciate
> it.
>
> Yours etc,
> Aodhán
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/I-want-to-create-an-object-to-use-for-the-plot-command-tp3390383p3390383.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list