[R-sig-ME] longitudinal analysis of nested samples

Giancarlo Sadoti gcsadoti at yahoo.com
Mon Oct 17 08:39:49 CEST 2011


Greetings list,

I'm helping a colleague with an analysis of spatially-clustered longitudinal data.  She is interested in testing for change in vigor (V) in a set of trees over time.

In each of 5 years (YR), 4 trees (TR) were measured per point, 10 points (PT) were measured along a transect. There may be two additional levels (transect and site), but let's just consider one site on one transect for now.  V is normally-distributed, fyi.

My (basic) understanding of longitudinal models suggests I use the following model formulation (using lme4):

>lmer(V ~ YR + (YR|TR), data=TREES)

Linear mixed model fit by REML 
Formula: V ~ YR + (YR | TR) 
   Data: TREES 
  AIC  BIC logLik deviance REMLdev
 1423 1449 -705.5     1415    1411
Random effects:
 Groups   Name        Variance   Std.Dev. Corr   
 TR       (Intercept) 0.00247886 0.049788        
          YR          0.00081403 0.028531 -0.065 
 Residual             0.71588684 0.846101        
Number of obs: 560, groups: TR, 1

Fixed effects:
             Estimate Std. Error t value
(Intercept) 206.17857   35.89736   5.744
YR           -0.10107    0.03367  -3.002

Correlation of Fixed Effects:
   (Intr)
YR -0.531

The model indicates a negative trend in vigor over time. However, this only addresses the first level in the hierarchy (TR), if I wanted to address within-point variance in vigor, would I simply add a random intercept for point (1|PT)? (see below) Likewise, if I had additional levels of sampling (e.g. transect [TR]), would adding (1|TR) be appropriate?

> lmer(V ~ YR + (YR|TR) + (1|PT), data=TREES)
Linear mixed model fit by REML 
Formula: V ~ YR + (YR | TR) + (1 | PT) 
   Data: TREES 
  AIC  BIC logLik deviance REMLdev
 1326 1356 -655.8     1309    1312
Random effects:
 Groups   Name        Variance   Std.Dev.  Corr  
 PT       (Intercept) 1.4817e-01 0.3849224       
 TR       (Intercept) 2.8743e-03 0.0536120       
          YR          1.2003e-06 0.0010956 0.271 
 Residual             5.7145e-01 0.7559429       
Number of obs: 560, groups: PT, 11; TR, 1

Fixed effects:
             Estimate Std. Error t value
(Intercept) 206.16368   32.07247   6.428
YR           -0.10107    0.01601  -6.313

Correlation of Fixed Effects:
   (Intr)
YR -0.998

It appears V varies between points (PT), and the model is much improved.  Is this the correct route?

Many thanks, and pardon me if this has been asked previously.

Giancarlo




More information about the R-sig-mixed-models mailing list