Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
66 views

How to use emmeans for contrast/pairwise comparison when fixed-effect model matrix is rank deficient?

I have a data with 3 fixed effect factors G (two levels g1 and g2), V (two levels v1 and v2) and C (c1,c2,c3,c4,c5,c6,c7), and a random effect ID. I need to fit a linear mixed model or robust lmm with ...
ksing's user avatar
  • 39
0 votes
2 answers
46 views

GLMM - similar estimated means across software but differing fixed effect estimates

I have run a GLMM using glmer (from lme4) in R. The fixed effects estimates are very different (much smaller) than expected in comparison to the estimated marginal means. GLMM OUTPUT `Generalized ...
nalee_psych's user avatar
0 votes
1 answer
233 views

Linear mixed model EMMEANS using multiply imputed datasets (mids) adds level to factor variable

I'm using a multiply imputed dataset (mids) to run a linear mixed model in R, and then I tried the emmeans package to obtain my emmeans with p-values. X2 is a factor which I'm interested in, that was ...
Alexandra Chapdelaine's user avatar
0 votes
0 answers
129 views

How to create a function in R to add emmeans-contrasts output to a ggplot-graphic?

I hope someone can help me with this problem. I have no background in computer science or programing, which makes it hard to understand why my code doesn't work. My goal is to create a number of plots,...
e.naslund's user avatar
1 vote
1 answer
135 views

Post-hoc comparisons of quasi-family glmer models with emmeans

Since "quasi" families cannot be used in glmer, there is an efficient approach to adjust the standard errors of the parameters and the associated statistics post-fitting (https://bbolker....
RKüm's user avatar
  • 13
0 votes
1 answer
271 views

BACI design: How to account for the difference in Before-After Control?

I ran a BACI experiment looking at the effect of artificial light at night on fish reproduction, and one of our response variable is the yolk area in their eggs. My raw data looks like the attached ...
Thibaut Roost's user avatar
1 vote
1 answer
317 views

Finding the effect of a covariate averaged over all other covariates and interactions in R

I am running a linear mixed model in R using data with repeated measures for a project and as part of my analysis I need to determine what the effect of time is (how much the outcome changes from one ...
kjb17's user avatar
  • 31
0 votes
0 answers
67 views

Method and code for linear model to contrast group scores at all timepoints

I have a dataset from an RCT with two groups and continous outcomes assessed at three timepoints (baseline, follow-up 1, and follow-up 2). The data was in long form, and after reading guides about how ...
Biscuity's user avatar
1 vote
2 answers
238 views

Emmeans including interaction that shouldn't exist?

I have a data set that has three between-participant groups and one dependent variable. I created a dummy coded column for Groups 2 and 3, such that Group 1 is the reference group. I then fit a model ...
KG202's user avatar
  • 13
1 vote
1 answer
669 views

lmer pairwise comparisons for 3 variables interactions, holm correcting for few planned comparisons instead of 28

I have 3 IVs: Within --> Hand(left,right), Time(pre,post); Between --> Training (treatment, sham) and a continuous DV: RT. I have run a linear mixed effect model to see if there are significant ...
toni's user avatar
  • 13
0 votes
1 answer
700 views

Why are there non-estimates in my emmeans output? [duplicate]

I have generated a series of linear mixed models from my data and wanted to generate some estimated means using the emmeans package. My master dataset contains both night time and day time data to ...
e_putyora's user avatar
0 votes
0 answers
56 views

Are you able to see the data used in place of missing data in lmer and emmeans?

I am running lmer in R for a two-way (condition x time) repeated mixed linear model in R. I have two groups and a pre- and post-test measurement. I am using emmeans to determine pairwise comparisons. ...
Elad Nosugref's user avatar
1 vote
1 answer
258 views

How to calculate emmeans using get() in a loop

I am looping over about 20 columns, running mixed models. That all works fine. But when I try to calculate emmeans, I get an error because of the get(thisvar) in the model. The code is: for(thisvar in ...
LucaS's user avatar
  • 1,315
1 vote
0 answers
233 views

Extracting bootstrapped emmeans, CI’s, and the corresponding replicates from a lme4::lmer() model

I am primarily looking for a sanity check here in the approach I’ve used to generate bootstrapped estimated marginal means and confidence intervals (while being able to access the replicates to plot ...
zr2015's user avatar
  • 33
0 votes
1 answer
107 views

Emmeans on sqrt transform - no variable in reference grid

I've run multiple models for my data, and the sqrt tranformation is the best fit. However, when I try to run an emmeans on it, it states that my random variable is not in the reference grid. This ...
Segeana's user avatar
  • 13

15 30 50 per page