[R] What's wrong with this simple code???

Uwe Ligges ligges at statistik.uni-dortmund.de
Sun May 30 11:51:31 CEST 2004


Yong Wang wrote:

> Hi, all
> I can not figure this out, please have a look and help me out.
> thank you! 
> 
> Note: this is in SPLUS, not R.

Note 1: This mailing list is about R, not S-PLUS.

Note 2: Your code is not reproducible - we don't have the data.

I'd suggest that you repost your question including an easily 
reproducible example on the S-News mailing list.

Uwe Ligges


> 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]
> 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
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list