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
m2 <-glmer(formula = incubating~temp+day_of_experiment+infected+total_alive+(1|parent), family ="poisson", data = behavior)
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model is nearly unidentifiable: very large eigenvalue
- Rescale variables?
# Warning: Model is nearly unidentifiable: very large eigenvalueplot(allEffects(m2))
Assess whether or not to keep random effect with dAIC
ICtab(m2,m2.1)
dAIC df
m2 0.0 6
m2.1 13.9 5
# Keep random effect of parent colony, dAIC is lower
Model 2.2: everything except total_alive
m2.2<-glmer(formula = incubating~temp+day_of_experiment+infected+(1|parent), family ="poisson", data = behavior)
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model is nearly unidentifiable: very large eigenvalue
- Rescale variables?
# Warning: Model is nearly unidentifiable: very large eigenvalueplot(allEffects(m2.2))
Model 2.3: everything except infected
m2.3<-glmer(formula = incubating~temp+day_of_experiment+total_alive+(1|parent), family ="poisson", data = behavior)
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model is nearly unidentifiable: very large eigenvalue
- Rescale variables?
# Warning: Model is nearly unidentifiable: very large eigenvalueplot(allEffects(m2.3))
Model 2.4: everything except day_of_experiment
m2.4<-glmer(formula = incubating~temp+infected+total_alive+(1|parent), family ="poisson", data = behavior)
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge with max|grad| = 0.00256368 (tol = 0.002, component 1)
#Warning: Model failed to converge with max|grad| = 0.00256368 (tol = 0.002, component 1)plot(allEffects(m2.4))