[R] Fit unequal variance model in R

Dieter Menne dieter.menne at menne-biomed.de
Fri Apr 3 19:39:27 CEST 2009



Feng Jingyu wrote:
> 
> I used gls and it still does not provide me different estimates of
> variance for each treatment group. Did I do anything wrong?
> 
> lm3<-gls(GSI~treatment,data=z,weights=varIdent(form=~treatment),method="ML")
> 

try

weights = varIdent(form~1|treatment)

See the example in library/nlme/scripts/ch05.r ,fm1Orth.gls

Dieter




-- 
View this message in context: http://www.nabble.com/Fit-unequal-variance-model-in-R-tp22829549p22873236.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list