[R] Linear mixed effect model doubt:

Paqui GG paquiydeleite at hotmail.com
Tue Jul 2 12:00:55 CEST 2013


We have a doubt on whether we are applying a lme model correctly.



Our experimental/sampling design is as follows:



We are studying the relationship between two quantitative and continuous

variables at different sampling stations along a transect in the ocean. At each

station, we take three water samples (fReplica) and we experimentally measured

the dependent variable (Var1) for three different values of the independent one

(Var2). So, for each station (fstation) we have 3 replicates with 3 paired

observations of Var1 and Var2 each (this is all that was logistically possible).

Our data frame looks like:



Var1,Var2,fstation,fReplica

0.9 ,0.2,1,1

1.9 ,0.4,1,1

10.9,0.6,1,1

0.5, 0.3,1,2

0.9, 0.5,1,2

20.1,0.7,1,2

0.2, 0.1,1,3

1.3, 0.6,1,3   

40.1,0.9,1,3

... (for 32 stations)



We want to test whether the slopes and intercepts of the relationship between

Var1 and Var2 vary between stations.



We have been studying how to make a correct test. We believe our design is

similarly to the model that Zuur et al 2009 apply to an example of Zuur et al

2007. In their case, they used species richness as dependent variable and NAP

(the height of a sampling station compared to mean tidal level) as the

independent one. This variables were measured for nine beaches and 5 replicates

were taken for each beach. The main difference Zuur et al and our study is that

they have one point per replica and we have a "regression" of 3 points per replica.





We are applying this model to our data:



## Mlme <- lme(Var1~Var2, random=~1|fstation/fReplica ,data=Data)

## summary(Mlme)





but we are not sure if we are doing the correct test.

Any help or pointers to bibliography with similar analysis will be much appreciated. 		 	   		  


More information about the R-help mailing list