Julian:

When it comes to a mixed linear model, there are "levels" of the variance components but there are no "levels" associated with the fixed effects. In the model specification for glmer, it seems that your linear predictor has 2 levels of random variation. The idea of levels for fixed effects tends to come from software programs that write these models out using a hierarchical notation, and I think that is a bit confusing.

Maybe someone else knows, but can you clarify what you mean by "spatial scale of the explanatory variables"? 


-----Original Message-----
From: r-sig-mixed-models-bounces@r-project.org on behalf of Julian PICHENOT
Sent: Tue 8/5/2008 11:26 AM
To: r-sig-mixed-models@r-project.org
Subject: [R-sig-ME] level-dependent explanatory variables
 
Dear mixed models list,

I am trying to fit models with lme4 for a data set which has an  
unbalanced and hierarchical structure.
The goal is to model the presence/absence (0/1) of a frog species in  
ponds, considering potential explanatory variables measured at three  
levels (spatial scales).

The nested structure is as follow : 1516 ponds are nested within 134  
patches and these patches are nested within 24 landscapes.

There are 3 variables measured at each level :
Pond level : A1,B1,C1
Patch level : D2,E2,F2
Landscape level : G3,H3,I3.

This is the structure of the data set :
> str(msc)
'data.frame':   1516 obs. of  13 variables:
  $ y      : int  0 1 0 1 0 0 0 1 0 0 ...
  $ A1   : num  -0.758 -0.835 -0.835 -0.757 -0.757 ...
  $ B1   : num  -1.77 -1.77 -1.77 -1.80 -1.80 ...
  $ C1   : num  -0.262 -0.189 -0.189 -0.286 -0.286 ...
  $ D2  : num  0.869 0.869 0.869 0.869 0.869 ...
  $ E2: num  -2.49 -2.49 -2.49 -2.49 -2.49 ...
  $ F2   : num  -1.09 -1.09 -1.09 -1.09 -1.09 ...
  $ G3  : num  -0.327 -0.327 -0.327 -0.327 -0.327 ...
  $ H3  : num  -1.56 -1.56 -1.56 -1.56 -1.56 ...
  $ I3 : num  1.15 1.15 1.15 1.15 1.15 ...
  $ POND   : int  1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 ...
  $ PATCH  : int  1 1 1 1 1 1 1 1 1 1 ...
  $ LAND   : int  1 1 1 1 1 1 1 1 1 1 ...

Due to the fact that they are measured at a higher level than the  
pond, the values of D2,E2,F2 are repeated for each pond in a one  
particular patch and the values of G3,H3,I3 are repeated for each pond  
of each patch in one particular landscape.

Here is the code that I use :

> glmer(y~A1+B1+C1+D2+EP2+F2+G3+H3+I3+(1|LAND/PATCH),family=binomial,data)

But I find the results a bit strange. Only the variables measured at  
the pond level are significant and I have doubts about this.

Is there another way to fit a model that takes into account the  
spatial scale of each explanatory variable ?

I use the following packages :

> sessionInfo()
R version 2.7.0 (2008-04-22)
i386-pc-mingw32

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
other attached packages:
[1] lme4_0.999375-22   Matrix_0.999375-10 lattice_0.17-6
loaded via a namespace (and not attached):
[1] grid_2.7.0

Thanks in advance for your help and answers.
Best regards.

Julian

_______________________________________________
R-sig-mixed-models@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


	[[alternative HTML version deleted]]


