Solved – Interpreta​tion of main effect when interactio​n term is significan​t (ex. lme)

As an example I use Pinheiro, J. C. & Bates, D. M. 2000. Mixed-effects models in S and S-PLUS. Springer, New York. page 225. Rats whose body mass has been measured are fed by 3 different diets over time. Response: Body mass, fixed effects Time*Diet, random effect ~Time|Rat. The main question with this test was … Read more

Solved – How to correctly model repeated-measures random effects in a linear mixed effects model

I have a mixed design data set where participants respond to each of three interventions and also report various demographics. The intervention is thus repeated-measures and each demographic measure is between-subjects. I want to model this as a linear mixed effects model with random slopes and intercepts, but I can't figure out what the correct … Read more

Solved – Checking assumptions LMM: residual plot with diamond shape

I am running a linear mixed model and want to check its assumptions. The model I run is comparing if males and females behave differently over time (timeclass=1,2,3,4): x <- lme(response ~ timeclass*sex, random = ~ 1|subject, method="ML", data=dat) The code to create the plots: plot(x) plot(x, response ~ fitted(.) | sex, abline = c(0,1)) … Read more

Solved – Level-2 predictions with lme4/glmer model

Let's say I've fitted a 2 level model with glmer like this: data.model <- glmer(y ~ 1 + level1.var11 + level2.var21 + (1 | ID), family = binomial(link = "logit"), data = dataset) where the level-2 grouping is done by ID, level1.var11 is a level-1 predictor, and level2.var21 is a level-2 predictor. For example, let's … Read more

Solved – How does one decide on whether to use a GLMM versus an LME? And how do you select the random/fixed effects

So I have read many textbooks and so many R tutorials that I am going crazy here. How do you decide on which model to use? I really hope this comes with experience but with the amount of modern techniques coming out and evidence for and against transformations, etc., how is anyone supposed to actually … Read more

Solved – How does one decide on whether to use a GLMM versus an LME? And how do you select the random/fixed effects

So I have read many textbooks and so many R tutorials that I am going crazy here. How do you decide on which model to use? I really hope this comes with experience but with the amount of modern techniques coming out and evidence for and against transformations, etc., how is anyone supposed to actually … Read more

Solved – Poisson GLMM vs GLM in R (lme4)

I have been trying to sharpen my GLMM knowledge by working through some problems in Foundations of Linear and Generalized Linear Models. I am stuck on problem 9.36 which gives some homicide data then states "fit a Poisson GLMM. Interpret estimates. Show that the deviance decreases by 116.6 compared with the Poisson GLM, and intercept" … Read more

Solved – Model Assumptions: LMER / GLMER Model where Dependent Variable is a Percentage

I am attempting to build a model for the following dataset: Level 1 Observations (Product-Level): 89000 Level 2 Observations ("BU_SBU" Department-Level): 135 Unfortunately I cannot share a sample of my data, since it is confidential. The dependent variable in the model is a percentage (Delivery Reliability, 0-100%). Fixed effects include roughly 20 variables at level … Read more

Solved – How to interpret glmer results (variance, correlation and ICC)

I'm a beginner in statistics and I have to run multilevel logistic regressions. I am confused with the results as they differ from logistic regression with just one level. I don't know how to interpret the variance and correlation of the random variables. And I wonder how to compute the ICC. For example : I … Read more

Solved – How to interpret glmer results (variance, correlation and ICC)

I'm a beginner in statistics and I have to run multilevel logistic regressions. I am confused with the results as they differ from logistic regression with just one level. I don't know how to interpret the variance and correlation of the random variables. And I wonder how to compute the ICC. For example : I … Read more