I want to model survival outcome as a response to stem length for a plant species. All individuals within plots were tagged and sampled in year 1, then re-found and sampled again in year 2, with an interval of one year between measurements. The variables include fate at year 2 (survival = 1, death = 0) and length (normally distributed, continuous variable with min 0 and max 224). This data was collected from a total of 16 plots within two distinct populations (8 plots per population). Each row in the data includes data from both surveys: len
is year 1 length, surv
indicates that the plant was alive or dead at the time of re-sampling. Additionally, the experimental design included a single treatment variable with two levels: fenced plot ($n=7$) or unfenced plot ($n=9$). I am using length at the time of the first survey len
to predict fate surv
over the following year.
Data snippet:
Population Treatment Plot TagNum flw len flw_next len_next surv repr
sc fenced nf11a 11 0 5 0 63 1 0
sc fenced nf11a 25 0 5 0 0 0 0
sc unfenced hp2a 549 0 6 0 0 0 0
fl fenced mpna 413 0 7 0 0 0 0
fl unfenced mpsb 920 0 7 0 0 0 0
fl unfenced nnb 315 0 9 0 19.2 1 0
I would like to identify differences in the relationship between length and survival outcome at three levels: (H1) differences between populations, (H2) differences between treatments, and (H3) differences between plots within each population. I have specified the following two GLMMs using lme4
:
Model 1:
mod.Surv <- glmer(surv ~ len*Population + (1|Plot:Population), family='binomial', data=plant_data)
Model 2:
mod.Surv.int <- glmer(surv ~ Treatment*Population + (1|Plot:Population), family='binomial', data = plant_data)
Model 2 is included only to make inferences about the effect of the interaction between treatment and population on survival. I don't have the stats background to really interrogate these models, so I'd like to know whether 1) these models are correctly specified and 2) how to interpret their output given my hypotheses 3)how to specify a single, "better" model that includes effects of all three nested variables
Output from summary(mod.Surv)
:
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation)
[glmerMod]
Family: binomial ( logit )
Formula: surv ~ len * Population + (len | Plot:Population)
Data: plant_data
AIC BIC logLik deviance df.resid
356.0 388.9 -171.0 342.0 802
Scaled residuals:
Min 1Q Median 3Q Max
-14.7529 0.0719 0.1636 0.3058 0.8438
Random effects:
Groups Name Variance Std.Dev. Corr
Plot:Population (Intercept) 0.789138 0.88833
len 0.001607 0.04009 -0.87
Number of obs: 809, groups: Plot:Population, 16
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.42173 0.69625 -0.606 0.54470
len 0.10638 0.02905 3.662 0.00025 ***
Populationsc 1.18589 0.85981 1.379 0.16782
len:Populationsc -0.04913 0.03292 -1.493 0.13555
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) len Ppltns
len -0.903
Populatinsc -0.731 0.637
len:Ppltnsc 0.692 -0.748 -0.877
Output of summary(mod.Surv.int)
:
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation)
[glmerMod]
Family: binomial ( logit )
Formula: surv ~ Treatment * Population + (1 | Plot:Population)
Data: plant_data
AIC BIC logLik deviance df.resid
401.4 424.8 -195.7 391.4 804
Scaled residuals:
Min 1Q Median 3Q Max
-4.7187 0.2172 0.2259 0.2941 0.3881
Random effects:
Groups Name Variance Std.Dev.
Plot:Population (Intercept) 0.1129 0.336
Number of obs: 809, groups: Plot:Population, 16
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.0219 0.3799 7.955 1.8e-15 ***
Treatmentunfenced -0.7428 0.4955 -1.499 0.1338
Populationsc -0.6338 0.5219 -1.214 0.2246
Treatmentunfenced:Populationsc 1.2821 0.6886 1.862 0.0626 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) Trtmnt Ppltns
Trtmntnfncd -0.752
Populatinsc -0.718 0.544
Trtmntnfn:P 0.555 -0.724 -0.763
treatment
, and your second model doesn't includelength
. It would seem better to have a single model that includes both, as both seem of interest here. Also, please explain more how the survival 0/1 values are determined. Was the time at risk the same for all plants? Please provide that information by editing the question, as comments are easy to overlook and can be deleted. $\endgroup$mod.Srv <- glmer(surv ~ len*Population + Treatment + (0+len|Plot), family='binomial', data=ribes_noNew)
$\endgroup$