I do not have garch and the data but I suggest you to insert browser()
in the function and see what is happening. See below.
On Sun, 2004-05-30 at 15:32, Yong Wang wrote:
> Dear all.
> got a problem, simply can not figure out, please help me, thank you in
> advance:
>
> I have following code
> > ***********************************
> > modfit<-function(yir,yew, ft) {
> >
> > n<-length(yew)
> > yew<-yew[1:(n-1)]
> >
> > yy<-yir-ft
> > xx<-yew-ft
> >
> > n<-length(xx)
> > xx0<-xx[2:n]
browser()
> > yy0 <-yy [2:n]
> >
> > xx1<-xx[1:(n-1)]
> >
> > fit <- garch(yy0~xx0 + xx1+var.in.mean, ~garch(1,1),cond.dist='ged')
> > summary(fit)
> > }
> >
> > fs1hca<-modfit(s1hca.r, s1hca.ew, zfr)
> >
> > **************error message is ***************
> >
> > Problem in garch(yy0 ~ xx0 + xx1 + var.in.mean, ~ ..: Object "xx0" not
> > found Use traceback() to see the call stack
> >
> It is really weird, I tried step by step, the code works,
> but what's the problem with xx0,I can't figure it out.
>
> thank you for any suggestion.
>
> best regards
> yong
>
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message: unsubscribe s-news
--
Zhu Wang
|