Loading required package: Matrix
Attaching package: 'Matrix'
The following objects are masked from 'package:tidyr':
expand, pack, unpack
library(glmmTMB)
Warning in checkDepPackageVersion(dep_pkg = "TMB"): Package version inconsistency detected.
glmmTMB was built with TMB version 1.9.1
Current TMB version is 1.9.2
Please re-install glmmTMB from source or restore original 'TMB' package (see '?reinstalling' for more information)
library(effects)
Loading required package: carData
lattice theme set by effectsTheme()
See ?effectsTheme for details.
library(car)
Attaching package: 'car'
The following object is masked from 'package:dplyr':
recode
The following object is masked from 'package:purrr':
some
library(bbmle)
Loading required package: stats4
Attaching package: 'bbmle'
The following object is masked from 'package:dplyr':
slice
# Model 3 (original model with everything) works best
stationaryprop = (behaviorprop$stationary/behaviorprop$total_alive)behaviorprop<-cbind(behaviorprop,stationaryprop)m3.0<-glmer(formula = stationaryprop~temp+day_of_experiment+infected+total_alive+(1|parent), family ="binomial", data = behaviorprop)
Warning in eval(family$initialize, rho): non-integer #successes in a binomial
glm!
boundary (singular) fit: see help('isSingular')
plot(allEffects(m3.0))
Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Warning in eval(family$initialize): non-integer #successes in a binomial glm!
Warning in eval(family$initialize): non-integer #successes in a binomial glm!
behaviorprop$notstationary <- behaviorprop$total_alive-behaviorprop$stationarym3.5<-glmer(formula =cbind(stationary,notstationary)~temp+day_of_experiment+infected+total_alive+(1|parent), family ="binomial", data = behaviorprop)summary(m3.5)
Generalized linear mixed model fit by maximum likelihood (Laplace
Approximation) [glmerMod]
Family: binomial ( logit )
Formula: cbind(stationary, notstationary) ~ temp + day_of_experiment +
infected + total_alive + (1 | parent)
Data: behaviorprop
AIC BIC logLik deviance df.resid
5891.7 5922.6 -2939.8 5879.7 1274
Scaled residuals:
Min 1Q Median 3Q Max
-3.9717 -1.0662 -0.1844 0.9518 5.2412
Random effects:
Groups Name Variance Std.Dev.
parent (Intercept) 0.1519 0.3897
Number of obs: 1280, groups: parent, 6
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.855742 0.332095 2.577 0.00997 **
temp -0.051084 0.003628 -14.080 < 2e-16 ***
day_of_experiment -0.048572 0.003111 -15.612 < 2e-16 ***
infected 0.320460 0.046328 6.917 4.61e-12 ***
total_alive 0.020088 0.024605 0.816 0.41425
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Correlation of Fixed Effects:
(Intr) temp dy_f_x infctd
temp -0.487
dy_f_xprmnt -0.354 0.130
infected -0.137 0.050 0.196
total_alive -0.796 0.180 0.320 0.046