[R-sig-ME] repeat measures: time series or mixed model?

CL Pressland Kate.Pressland at bristol.ac.uk
Tue Mar 24 20:13:20 CET 2009


Dear all,

I've scrolled through the archives and CRAN help pages and can't find an 
answer for my query: my apologies if it is rather basic.

I have a data set that is unbalanced and consists of:

67 SITEs measured over several YEARs every WEEK (April-Sept) for 
butterflies (LEPS per m - continuous data). I'm interested in the 
MANagement code (categorical) assigned to each site, but I have also data 
on TEMPerature, average SUN and WIND (some missing data with weather 
variables though). My guess is that a linear mixed model would be most 
appropriate and have constructed this code first of all:

model<-lme(LEPS~MAN,random=~YEAR/WEEK|SITE)

The output gives me:
--------------------------------------------------------------------
Linear mixed-effects model fit by REML
 Data: NULL
        AIC       BIC   logLik
  -37631.24 -37566.48 18824.62

Random effects:
 Formula: ~YEAR/WEEK| SITE
 Structure: General positive-definite, Log-Cholesky parametrization
             	 StdDev       Corr
(Intercept)   	5.875102e-03 (Intr) YEAR
YEAR          	1.392439e-06 -0.164
YEAR:WEEK 		5.068196e-07  0.531  0.301
Residual      	3.532589e-02

Fixed effects: LEPS ~ MAN
                  Value   Std.Error   DF  t-value p-value
(Intercept) 0.009866718 0.001428957 9793 6.904841    0.00
MAN     	0.000028304 0.001127429   65 0.025105    0.98
 Correlation:
        (Intr)
MAN -0.685

Standardized Within-Group Residuals:
        Min          Q1         Med          Q3         Max
-2.70566579 -0.40089121 -0.18073723  0.05900735 19.16411466

Number of Observations: 9860
Number of Groups: 67
--------------------------------------------------------------------

I am slightly confused by the output. I figure that this clearly means that 
management has no effect on butterflies but how can I figure out what 
effect SITE, YEAR and WEEK have on the data? Would I have to also include 
them in the fixed effects side of the formula (I'm unsure if this is 
allowed)? Also, how could I include my weather variables? Would they just 
be placed on the fixed effect side of the formula as they are covariates?

e.g. model<-lme(LEPS~MAN+TEMP+SUN+WIND,random=~YEAR/WEEK|SITE)

They are bound to be correlated so does that cause problems when putting 
into the same model? Could I simply use na.exclude in this instance to 
remove records missing but still include the data for the other effects? I 
have seen so many different ways in which this can be done - I want to make 
sure I do it correctly.

Furthermore, I am unsure if this qualifies as a time-series analysis or if 
linear mixed modeling is ok. The data is unbalanced as not all sites have 
records for each week. The data are clearly nested so from all I've read 
seems to be pointing to lmm. I understand that there will be correlations 
between each repeat measure (week) as a butterfly recorded in week 1 
*might* be the same butterfly in week 2, but surely this occurs with all 
repeat measures designs?

I'm certain this query must be simple - can anyone clarify what to do?

Any help is truly appreciated.

Kate




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