23 May 05:35
Group level predictors in mixed models
Dear R-sig-mixed-models subscribers, I am analizing survival (ALIVE) of one year-old seedlings of over a hundred species as a function of the total number of seedlings (TOTABN) and the proportion of conspecifics seedlings (CONSPp) in their neighborhood (sampling quadrat). The data comes from monitoring seedling dynamics trough time (YEAR) in a series of forest plots (PLOT). A crucial part of the analysis is to understand the variation in responses between species (SPECIES). For now, I have one continuous species-level variable, abundance across the landscape (LANDSPABN), that I would like to use to explain the variation between species. After reading a number of printed and online references on advanced statistical models it seems to me that my problem could be properly analyzed using hierarchical bayesian modelling but I am just beggining to understand lmer (and R) and I was wondering if using such tools I can also perform a meaningfull analysis.My first approach in lmer was to specify a model with varying intercept and slope for the effect of conspecifics, i.e. (1+CONSPp|SPECIES) and to extract from the results the conditional modes (using terminology in Prof. Bates draft book) of the random effects (and their variances) to model them separately as a function other continuous predictors (using simple weighted linear regressions). The full model of this approach is: M1<-lmer(ALIVE~CONSPp+TOTABN+(1+CONSPp|SPECIES)+(1|PLOT)+(1|YEAR), data=oneyrseedl,family=binomial). After further reading I found an example from Gelman and Hill 2007 in which he includes "group level predictors". Specifically in their example, a predictor X1 appears both as fixed (y~ X1) and random effect (1+ X1 | grouping factor) with the grouping factor predictor (X2) modelled as an interaction with X1. So their full model is y ~ X1 + X2 + X1:X2+ (1 + X1 | grouping factor). I thought I may be able to specify a similar model to directly incorporate my continuous species-level variable (species abundance across the landscape) to explain the variation in the effect of conspecifics on seedling survival. One crucial difference between my case and Gelman and Hill´s case is that my continuous species-level variable has only one value per species (my grouping factor) while their X2 has a series of values per grouping factor. I thus think that if include the continuous species-level variable in the model I do not need to include a random slope for the effects of conspecifics (with SPECIES as a grouping factor) as I feel it would control for all the variation that could be more meaningfully explained by my species-level variable (or any other species-level variable I may come up later). Thus, the model I am thinking about would be: M2<-lmer(ALIVE~CONSPp+TOTABN+ LANDSPABN+ CONSPp:LANDSPABN + (1|PLOT)+(1|YEAR), data=oneyrseedl,family=binomial). I am doubting if a random(Continue reading)
RSS Feed