[R-sig-ME] (no subject)
Adam D. I. Kramer
adik at ilovebacon.org
Tue Jan 27 20:28:58 CET 2009
Hi Lawrence,
contrasts(lambweight$age) returns the contrast matrix that is tested
by lm, lme, etc....you can assign to this matrix. You probably want
contrasts(lambweight$age) <- matrix(c(
1,0,0,
0,1,0),nrow=2)
...to do it in lme proper, add
contrasts=list(age=matrix(c(1,0,0,0,1,0),nrow=2))
to your command line.
Note also that you're not getting estimates for age2 and 3, you're getting
estimates for the difference between age2 and age1, and between age3 and
age1.
--Adam
On Tue, 27 Jan 2009, Lawrence Lee wrote:
>
> Dear all,
>
> Does anyone know how to change the reference group within lme().
> For example,
> lme(fixed = obs ~ line + age - 1,random = ~1 |sire, data = lambweight)
>
> Suppose age has 3 levels, so the code above will give me estimate
> of age2 and age3:
>
> Fixed effects: obs ~ line + age - 1 Value Std.Error DF t-value
> p-valueline1 10.491153 0.7261881 18 14.446882 0.0000line2 12.290287
> 0.8242309 18 14.911219 0.0000line3 11.032864 0.7647870 18 14.426061
> 0.0000line4 10.276735 0.7389137 18 13.907897 0.0000line5 10.952840 0.6084109
> 18 18.002373 0.0000age2 -0.155435 0.7157030 38 -0.217178 0.8292age3
> 0.009646 0.5481034 38 0.017599 0.9861
>
> How I can change within lme() in order to give me the estimate of
> age1 and age2.
>
>
> Thanks,
> Lawrence
> _________________________________________________________________
>
>
> ore_012009
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
More information about the R-sig-mixed-models
mailing list