[R-sig-eco] Help with mixed effects model using lme

Gabe Strain gstrain54 at yahoo.com
Thu Mar 17 23:27:37 CET 2011


Hi all, I am relatively new to R and am having problems modelling my data. I sampled a single salamander species along streams (Sites, random effect, n=16) over five months (fixed effect) with three methods (TRMT, fixed effect). Snout-to-vent length (SVL) was measured and salamanders (each salamander is represented as Subject) released. Each site had all three methods present(although there is some missing data) and each site was resampled each month. The data is structured as follows:

Site Month TRMT Subject  SVL
S15   May  VES       1  2.96
S15   May  VES       2  2.03
S15   May  VES       3  3.84
S15   May  VES       4  2.67
S15   May  VES       5  3.12
S15   May  VES       6  2.08

I'm trying to model SVL as a function of TRMT. I think that Subject is nested within TRMT which is nested within Month, but am unsure if I have corectly specified this in the model:

lme(SVL ~ Month/TRMT/Subject, random = ~1|Site, method="ML", correlation = corCompSymm(form = ~ 1 | Site)))

Or is this more appropriate:

lme(SVL ~ TRMT + Month + TRMT*Month, random = ~1|Site/TRMT, method="ML", correlation = corCompSymm(form = ~ 1 | Site/TRMT)))

I have included the correlation option to account for the fact that sites were sampled multiple times (compound symmetry may not be appropriate, this is just an example). Any advice would be very much appreciated! Thank you in advance for taking the time to look this over.


Sincerely,

Gabriel Strain
Graduate Research Assistant
Division of Forestry and Natural Resources
West Virginia University
Morgantown, WV 26506
301-876-1070
gstrain54 at yahoo.com
www.stat.wvu.edu/~gabrielstrain/gabrielstrain.htm



More information about the R-sig-ecology mailing list