[R] lme: Testing within-group coefficients

Dan Bebber dbebber at earthwatch.org.uk
Tue May 29 16:14:46 CEST 2012


I need to determine whether a variable y2e increases with a covariate xt within individuals, where individuals a-j are measured several times.
Is it possible to test whether within-group coefficients are significantly different from zero?
The coefficients from an lmList fitted to my data give:
> coef(lml2)
  (Intercept)          xt
a   3.5689877 -0.05413678
b  -0.1432629  0.02558787
c   6.9933976 -0.04593475
d  -1.2205123  0.03419385
e  11.4861355 -0.02997357
f -13.1410819  0.06999514
g  25.1284971 -0.05560643
h  26.9868990 -0.04947859
i  23.1811000 -0.03006984
j -18.3750713  0.05958911

doing summary(lme(lml2)) appears to give the coeffient across groups, which is not of interest:

> summary(lme(lml2))
...
Fixed effects: y2e ~ xt
                 Value Std.Error  DF  t-value p-value
(Intercept) 0.28520893 0.7168887 489 0.397843  0.6909
xt          0.02133808 0.0023420 489 9.110898  0.0000
...

Many thanks,
Dan Bebber



More information about the R-help mailing list