[R] Fit unequal variance model in R

Feng Jingyu
Fri, 03 Apr 2009 18:33:15 -0000

Thanks a lot. The problem is solved. It took me a while to understand the
output from the R. With little calculation, I am able to match results from
R to SAS.


Dieter Menne wrote:
>
>
> 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: