| fly_parameters {trouBBlme4SolveR} | R Documentation |
Data for the SO question warning messages when trying to run glmer in r.
Description
Two integer variables (ValidDetections and
FalseDetections) to build an outcome, two factor
variables to be used as clusters for the random effects
(SUR.ID and Day), three factor variables to be
used as fixed effects (tm, Area and
replicate), five numeric variables to be used as fixed
effects (c.distance, c.tm.depth,
c.receiver.depth, c.temp and c.wind) and a
pair of variables extra, allowing to build a model which fails
to converge.
Usage
data("fly_parameters")
Format
A data frame with 220 observations on the following 14 variables.
SUR.IDa factor with levels
101851018610250tma factor with levels
CTPT-04ValidDetectionsa numeric vector
CountDetectionsa numeric vector
FalseDetectionsa numeric vector
replicatea factor with levels
12Areaa factor with levels
Drug ChannelFingerDaya factor with levels
03/06/132/22/132/26/132/27/133/14/13R.deta numeric vector
c.receiver.deptha numeric vector
c.tm.deptha numeric vector
c.tempa numeric vector
c.winda numeric vector
c.distancea numeric vector
Source
warning messages when trying to run glmer in r
Examples
data(fly_parameters)
str(fly_parameters)
df <- fly_parameters
df$SUR.ID <- factor(df$SUR.ID)
df$replicate <- factor(df$replicate)
Rdet <- cbind(df$ValidDetections,df$FalseDetections)
Unit <- factor(1:length(df$ValidDetections))
library(lme4)
m1 <- glmer(Rdet ~ tm:Area + tm:c.distance +
c.distance:Area + c.tm.depth:Area +
c.receiver.depth:Area + c.temp:Area +
c.wind:Area +
c.tm.depth + c.receiver.depth +
c.temp +c.wind + tm + c.distance + Area +
replicate +
(1|SUR.ID) + (1|Day) + (1|Unit) ,
data = df, family = binomial(link="logit"))
summary(m1)
m1_new <- dwmw(m1, scale = TRUE, max_message_iter = 3)
summary(m1_new)