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 – Proportion of variance in dependent variable accounted for by predictors in a mixed effects model

Let say I've ran this linear regression: lm_mtcars <- lm(mpg ~ wt + vs, mtcars) I can use anova() to see the amount of variance in the dependent variable accounted for by the two predictors: anova(lm_mtcars) Analysis of Variance Table Response: mpg Df Sum Sq Mean Sq F value Pr(>F) wt 1 847.73 847.73 109.7042 … 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 – Does Poisson Regression have an error term

I was just wondering if Poisson regression has an error term? Can a Poisson regression have random effects and an error term? I am confused about this point. In logistic regression, there is no error term because your outcome variable is binary. Is that the only glm model that doesn't have a residual term? Best … Read more

Solved – Does Poisson Regression have an error term

I was just wondering if Poisson regression has an error term? Can a Poisson regression have random effects and an error term? I am confused about this point. In logistic regression, there is no error term because your outcome variable is binary. Is that the only glm model that doesn't have a residual term? Best … Read more

Solved – How to create a nearly orthogonal experimental design in R

Does anyone know an R package for nearly orthogonal designs? I would like to create an experimental design, using 12 runs, up to 10 factors, and with mixed levels (e.g. a combination of 2 and 3 level factors). I would like to explore some nearly-orthogonal designs. There are lots of packages for orthogonal fractional designs. … Read more

Solved – How to create a nearly orthogonal experimental design in R

Does anyone know an R package for nearly orthogonal designs? I would like to create an experimental design, using 12 runs, up to 10 factors, and with mixed levels (e.g. a combination of 2 and 3 level factors). I would like to explore some nearly-orthogonal designs. There are lots of packages for orthogonal fractional designs. … Read more

Solved – What are the differences between “Mixed Effects Modelling” and “Latent Growth Modelling”

I'm decently familiar with mixed effects models (MEM), but a colleague recently asked me how it compares to latent growth models (LGM). I did a bit of googling, and it seems that LGM is a variant of structural equation modelling that is applied to circumstances where repeated measures are obtained within each level of at … Read more