[R] gls

Pedro J. Aphalo pedro.aphalo at cc.jyu.fi
Sun Apr 14 14:30:09 CEST 2002


Dear all, I am confused.

I have encountered some strange behaviour of gls

> data(co2)
> co2.y <- aggregate(co2,1,mean)
> co2.y.data <- data.frame(co2=as.numeric(co2.y),year=seq(1959-1980,along=co2.y))
> co2.1.gls <- gls(co2~year+I(year^2), co2.y.data)
> co2.2.gls <- update(CO2.1.gls, corr=corAR1())
> summary(CO2.2.gls)
> plot(CO2.2.gls)

plot shows standardized residuals that range between 0.007 and -0.005.
summary(CO2.2.gls) shows results very different from summary(CO2.1.gls).

residual standard error seems to be badly estimated.

Are the data a pathological case? or am I doing something wrong?

Thanks in advance for any help.

(I was planning to use this example in a course...)

Pedro.

-- 
==================================================================
Pedro J. Aphalo
Department of Biological and Environmental Science
University of Jyväskylä
P.O. Box 35, 40351 JYVÄSKYLÄ, Finland
Phone  +358 14 260 2339
Mobile +358 50 3721504
Fax    +358 14 260 2321
mailto:pedro.aphalo at cc.jyu.fi
http://www.jyu.fi/~aphalo/                       ,,,^..^,,,
==================================================================
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list