| fly_parameters | R Documentation |
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.
data("fly_parameters")
A data frame with 220 observations on the following 14 variables.
SUR.IDa factor with levels 10185 10186 10250
tma factor with levels CT PT-04
ValidDetectionsa numeric vector
CountDetectionsa numeric vector
FalseDetectionsa numeric vector
replicatea factor with levels 1 2
Areaa factor with levels Drug Channel Finger
Daya factor with levels 03/06/13 2/22/13 2/26/13 2/27/13 3/14/13
R.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
warning messages when trying to run glmer in r
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.