[R-sig-ME] level-dependent explanatory variables
Julian PICHENOT
julian.pichenot at cerfe.com
Tue Aug 5 23:02:37 CEST 2008
Thank you for your answer.
I apologies for the confusing sense of « levels » that I used.
I?m going to try to clarify the meaning of « scale of each explanatory
variable » in my question.
Firstly, it may be easier if I explain what the scales are. The scale
is the resolution at which I measured the explanatory variables.
The landscape scale is a circle of 2500 meters radius in which there
are several patches.
Each patch is a circle of 200 meters radius in which there are several ponds.
Now I give you the significance of one variable that I measured for
each for these scales:
A1 is the water volume of the pond.
D2 is the number of ponds that I found in a patch.
G3 is the area covered by forest in a landscape.
So, I could say that A1 is a ?pond-specific? variable, D2
?patch-specific? and G3 ?landscape-specific?.
The aim of my study is to know if these explanatory variables can
explain the presence/absence of the species in a pond.
And to do so, I have to consider the two random effects « patch » and
« landscape ». That's the reason why I choosed to use lmer.
I hope this clarify my request.
Quoting "Doran, Harold" <HDoran at air.org>:
> 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 at r-project.org on behalf of Julian PICHENOT
> Sent: Tue 8/5/2008 11:26 AM
> To: r-sig-mixed-models at 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 at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
--
Julian PICHENOT
2C2A-CERFE
5, rue de la Héronnière
08240 BOULT-AUX-BOIS
FRANCE
More information about the R-sig-mixed-models
mailing list