[R] P-values in gls

Dimitris Rizopoulos dimitris.rizopoulos at med.kuleuven.be
Mon Mar 13 11:34:06 CET 2006


you could use anova(fit1, fit2), where fit1 represent a model only 
with intercept; however, you have to be a little bit more careful in 
this setting since gls() has as default method the "REML". Thus you 
should specify, e.g.,

fit1 <- gls(y ~ 1, correlation = ..., method = "ML")
fit2 <- gls(y ~ ..., correlation = ..., method = "ML")
anova(fit1, fit2)


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://www.med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Wilson, Andrew" <eiaaw at exchange.lancs.ac.uk>
To: <r-help at stat.math.ethz.ch>
Sent: Monday, March 13, 2006 10:53 AM
Subject: [R] P-values in gls


> When fitting a simple linear or polynomial regression using lm, R
> provides a p-value for the whole model as well as for the individual
> coefficients.  When fitting the same models using gls (in order to
> correct for autocorrelation), there doesn't seem to be a p-value
> provided for the whole model, although LL, AIC and BIC statistics 
> are
> provided.  Is it possible to obtain a p-value for the whole model?
>
> Many thanks,
> Andrew Wilson
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm




More information about the R-help mailing list