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.ID

a factor with levels 10185 10186 10250

tm

a factor with levels CT PT-04

ValidDetections

a numeric vector

CountDetections

a numeric vector

FalseDetections

a numeric vector

replicate

a factor with levels 1 2

Area

a factor with levels Drug Channel Finger

Day

a factor with levels 03/06/13 2/22/13 2/26/13 2/27/13 3/14/13

R.det

a numeric vector

c.receiver.depth

a numeric vector

c.tm.depth

a numeric vector

c.temp

a numeric vector

c.wind

a numeric vector

c.distance

a 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)


[Package trouBBlme4SolveR version 0.1.1 Index]