Questions tagged [lsmeans]

Least-Squares means are predictions from a model over a regular grid, possibly averaged over other dimensions. Also use this tag for the R packages emmeans and lsmeans.

Filter by
Sorted by
Tagged with
0 votes
1 answer
19 views

Emmeans and lmer with quadratic and cubic interaction

I have an experiment where I predict that the two levels of my Cond variable (effect coded as -1 and 1) will have different trends over time on my EDA_cs outcome variable (skin conductance). ...
Luminosa's user avatar
  • 101
0 votes
0 answers
26 views

Mixed beta regression interpretation with categorical predictor

I have run mixed beta regressions on proportional data but I am struggling in my interpretation of the results. I understand this has been asked before but I have a categorical predictor with four ...
ScottM10's user avatar
1 vote
1 answer
96 views

How to Compute Mean Ratios and Their 95% Confidence Intervals in a Bayesian Model

I am working on a Bayesian model using the brm function from the brms package in R, and I am interested in comparing mean responses of different groups. Specifically, I would like to calculate the ...
mat's user avatar
  • 561
0 votes
1 answer
15 views

Comparison between contrasts in emmeans

Let's say I have these estimated marginal means: ...
Alex Il's user avatar
  • 45
0 votes
0 answers
37 views

R: emtrends pairwise contrast results change when testing slopes against 0 or 1

When performing post-hoc simple slope analysis on my linear mixed effect model in R using emtrends(), I noticed that pairwise slope comparisons showed differences in the significance when I tested all ...
Malin's user avatar
  • 1
0 votes
1 answer
16 views

How to explain discrepancies between contrast estimates and mean differences?

(I'm working with R but the core of my question is about statistics.) I'm using a quasibinomial model in R with a dependent variable and several independent variables (both numeric and dummy variables)...
statuser's user avatar
1 vote
1 answer
41 views

Interaction terms and emmeans

Please pardon my ignorance, this may be a trivial question. I am fitting a simple linear model with interaction between a categorical predicator and a continuous predictor. ...
Science11's user avatar
  • 471
0 votes
1 answer
24 views

Calculating percentage change from emmeans

A related question was asked on this thread How to calculate percentage difference of geometric means with emmeans?, but I still need some help. Instead of calculating the absolute difference between ...
mrmic1's user avatar
  • 1
1 vote
0 answers
36 views

Using emmeans with GAM Model: Testing Group Differences on Specific Days

I'm analyzing data from an experiment involving 3 different groups that were observed over a period of 120 days, with data collected every 5 days. I fit a GAM to capture the temporal dynamics and I ...
Diego Pujoni's user avatar
1 vote
1 answer
87 views

Significance and confidence intervals from emmeans::contrasts on linear mixed model

I'm trying to understand the results from emmeans::contrast applied to a linear mixed model with continuous covariate (WR) and categorical fixed effect (Condition). ...
Jem Arnold's user avatar
2 votes
2 answers
76 views

Understanding emmeans outputs for poisson and negative binomial GLM fitted on count data with or without offset

I fitted a poisson and negative binomial GLM on count data (=larva) and try to explain it as a function of a factor (=modality). However, as the traps used to trap larvae from inflorescences were ...
Isa Gre's user avatar
  • 21
0 votes
1 answer
67 views

When to remove interaction term in linear model

I have fitted my data to a linear model in R using generalized least squares accordingly: mod<-gls(Y ~ A * B+Z, data) and used weights ...
Blanca's user avatar
  • 45
0 votes
1 answer
63 views

Help interpreting zeroinfl results from emmeans

I am working on the example Senecio data from Blasco‐Moreno et al. (2019) using the pscl package in R. I would like to conduct pairwise comparisons of mean rates (Damaged/Total_heads) and don't ...
stweb's user avatar
  • 378
1 vote
0 answers
31 views

Evaluating interaction effects with contrasts

I need help to interpret and understand contrasts of interaction effects for one of my models. I have a gls model with an interaction effect as follows: ...
Blanca's user avatar
  • 45
0 votes
1 answer
22 views

Difference in difference marginal probability from logistic model

I am trying to estimate the interaction term from a glmer model as a marginal probability contrast using emmeans. I can calculate the difference in differences marginal probability, but I was assuming ...
LucaS's user avatar
  • 517
2 votes
1 answer
70 views

Contrasts for relative change in proportions #emmeans

I have data indicating quality of life (QOL) as a percentage score from questionnaire data. The data is longitudinal (collected at baseline, 3, 6, 9 and 12 months) and there are other covariates such ...
user167591's user avatar
0 votes
0 answers
82 views

How to report emmeans results when p value = 1.00?

I am working with data of vegetation cover (proportions) for different height strata (0-5, 5-15, 15-30, >30 cm, and also bare ground) amongst four different sites and two different time periods (...
Agustín Gabriel Álvarez's user avatar
0 votes
0 answers
14 views

Counterfactual Contrasts in a Hierarchical model using emmeans()

--REPRODUCIBLE EXAMPLE INCLUDED! See below -- Hi! I'm attempting to measure a difference in sales using a Controlled Interrupted Time-Series methodology; that is, I have a collection of 'exposed' and ...
G. Vece's user avatar
  • 548
0 votes
1 answer
160 views

Why do emtrends and summary(model) provide different coefficients for a linear effect?

Let's say we run a model with a three-way interaction that includes a quadratic term with its associated linear term: ...
bee guy's user avatar
  • 989
1 vote
1 answer
24 views

Analysis of causal relationship of within-subject choice patterns among different groups using R - emmeans / hlm / Mixed Effects Logistic Regression

I am conducting a research and investigate the relationship between persona type (independent variable; a vs. b vs. c vs. d) and luxury perfume choice (dependent variable; niche vs prestige)(H1), ...
Marie Heleen Badji's user avatar
0 votes
1 answer
66 views

How to determine contrasts in combinations of categorical variables with emmeans

I have some data with a continuous outcome that is measured among 4 categorical variables: treatment group, gender, collection date, and sub_type. Gender is M/F, collection date can just be Mon/Wed, ...
Gmiller's user avatar
1 vote
1 answer
18 views

Is it possible to conduct post hoc eventhough there is no significant interation between the levels of factors in lmer results?

I want to conduct a statictical analysis on reation times(dependent) between two groups of people. suppose the factors are: A, B, group Is it possible for me to conducting a posthoc test(by using ...
lucia l's user avatar
  • 11
3 votes
1 answer
130 views

Why are emmip( "response") y axis numbers not probabilities for ordinal regression?

I used emmeans functions (with help from this site) to obtain pairwise comparisons for different levels of variables in a model with interactions. Interpreting an ...
Milo's user avatar
  • 143
1 vote
1 answer
93 views

p-Value from Z-ratio

I have run an Interrupted Time Series Analysis based upon the below code: ...
j.rahilly's user avatar
4 votes
1 answer
309 views

Contradiction between emmeans and t.test in R

I am analyzing two within-subject categorical variables (Factor A and Factor B) in R. Using linear mixed effects, I got a significant interaction. When I start to analyze the simple effect, I firstly ...
Buffoon's user avatar
  • 143
1 vote
0 answers
17 views

Compare the factor A between levels of factor B when an interaction exists, using emmeans

I have a model with the following formula: percent_discoloration ~ cv * year + zone_line where percent_discoloration is my ...
igorkf's user avatar
  • 363
0 votes
1 answer
27 views

LSMEANS for Poisson Regression in R

I have the dataset: ...
les2004's user avatar
0 votes
1 answer
74 views

emmeans contrasts of linear slope

I apologise for no doubt a basic question that I am having difficulty intuiting. I have data with a time component that is measured at irregular intervals (but the same irregular intervals for ...
LucaS's user avatar
  • 517
0 votes
0 answers
82 views

Predicted values and estimated marginal means

I am currently working on a statistical analysis project where I implemented a linear mixed model with only a random intercept and several fixed effects. I am considering visualizing the results by ...
Ed9012's user avatar
  • 41
0 votes
0 answers
59 views

How to get odd ratio for the result of pairwise comparison for binomial GLMM?

I have run a binomial generalised linear mixed model (GLMM) via the lme4 package in R. The optimal model of mine is from this syntax: fm1 <- glmer (answer~ (1|subj) + (1|item) + seeconversationmask,...
user3288202's user avatar
  • 1,315
2 votes
1 answer
242 views

emmeans weights for unbalanced groups/factors?

I have read through the emmeans "Basics of EMMs" vignette, "Working with messy data" vignette, and this Stack Overflow post but am still having a hard time knowing which 'weights' ...
Roanan's user avatar
  • 35
1 vote
0 answers
50 views

Significance threshold for emmeans contrasts

I am using binomial GAMs with mgcv in R to model binary species presence on a hydrophone against environmental (chlorophyll-a concentration, sea-surface temperature,...
Roanan's user avatar
  • 35
1 vote
1 answer
214 views

Can emmeans be used to predict an outcome using a gam model?

I have run a gam regression on data that looks like the following: age frequency person_years 10 1 12796.5 12 2 13049.5 13 5 13220.0 14 13 13313.0 15 27 13516.5 16 18 13778.5 using the ...
user383905's user avatar
1 vote
1 answer
119 views

emmeans for betareg is giving me identical arrow ranges when plotting comparisions = T

My response is a ratio (length of a discoloration disease in the plant divided by the height of the plant), so is always (0, 1). Actually, sometimes it could be [0, 1), i.e., including zeros. As I ...
igorkf's user avatar
  • 363
0 votes
1 answer
378 views

What is the difference between z.ratio and t.ratio in the pairwise comparison output using emmeans function?

I don't understand why the output of pairwise comparison using emmeans function is z.ratio when analysing response time data. What is the difference between z.ratio and t.ratio? And is this ...
Rosie's user avatar
  • 1
2 votes
2 answers
172 views

Comparing emmeans values multinom model

I am performing quite some binomial/multinomial models for my thesis. After doing the emmeans statement, I used the contrast statement to compare the emmeans of the different groups. But, I ...
S_vdp's user avatar
  • 41
0 votes
1 answer
70 views

Multiple vs Single Predictor Variables for GLMM Pairwise Comparisons

I am running binomial GLMMs in R to determine whether species presence (binary) on a hydrophone is different between seasons (i.e. spring, summer, fall, and winter) and photoperiods (i.e. day, night, ...
Roanan's user avatar
  • 35
0 votes
1 answer
151 views

post-hoc analysis for interaction terms in logistic regression: emtrends(), type I error

I built a logistic regression, including the followed variables. And I tried to compare effects of temp among group and habitat using emtrends() in ...
pineapple159's user avatar
1 vote
0 answers
13 views

emmeans df > observations [duplicate]

I made a lmer with an interaction between odour and concentration and random effect of date. I'm getting very high df in the emmeans output below. It's actually higher than the number of observations ...
Michael 's user avatar
2 votes
1 answer
121 views

What is the difference between p-values in summary() and p-values given e.g. by emmeans?

I am working on a binomial mixed model. I want to analyse the use of a certain construction by students. My response is CONSTRUCTION (two levels: THAT/NO_THAT). My predictors are both categorical (...
max22's user avatar
  • 51
2 votes
2 answers
276 views

Linear spline and 'interaction' p value

Wondering if someone can help clarify my intuition on this. Say you have a continuous covariate and a binary grouping variable and you introduce an interaction term between the two in a basic ...
LucaS's user avatar
  • 517
1 vote
1 answer
337 views

Calculating Confidence intervals of marginal means for a linear mixed model using emmeans package

I have built this model in R: ...
Pashtun's user avatar
  • 83
2 votes
2 answers
69 views

Why is the result from the coefficient of a three-way interaction in a linear mixed model different from the results of its marginal means?

Background I investigated if sex differences over time (gender:time) in treatment response (PPA) were dependent on smoking status (gender:time:smoking_status), accounting for correlations between ...
Pashtun's user avatar
  • 83
2 votes
0 answers
98 views

Effect sizes for GLMs

I'm just checking that I understand things correctly. If one wants Cohen's d-style effect sizes, and you have estimates from a GLM -- say a logit model -- there is no such thing--right? Because there ...
Russ Lenth's user avatar
  • 18.8k
0 votes
1 answer
89 views

How to calculate lsmeans from a glm model with family=binomial?

I would like to calculate adjusted means from a glm model with family = binomial. This is my script: ...
user21260341's user avatar
1 vote
1 answer
60 views

how to perform multiple comparisons on a linear mixed model with unbalanched set of groups

I have built a linear mixed model (rt.m6) with 2 fixed factors, namely condition and suffix, which also interact with each other. However, my experimental design isn't fully crossed, meaning that not ...
Eleni Tsaprouni's user avatar
1 vote
1 answer
468 views

What's the appropriate effect size estimate (and power analysis) for post-hoc regression?

I've seen some similar (ex ex2) questions, but hopefully this is not a duplicate. As it is mentioned in one of them, I'm using eemmeans to do pairwise comparisons ...
Larissa Cury's user avatar
1 vote
0 answers
37 views

Planned contrasts to test a priori hypotheses

I am planning a study with three between conditions. Let's say "Experimental group" vs. "Control group" vs. "Placebo group". And I have a numeric outcome "DV" ...
Y45H's user avatar
  • 33
1 vote
1 answer
86 views

Why do I get this error when trying to obtain back-transformed estimated marginal means using emmeans?

I am trying to examine the interaction between temperature (factor: 6 levels) and species (factor: 2 levels) in determining the duration of the first larval stage in insects using the following model ...
Insect_biologist's user avatar
1 vote
1 answer
469 views

emmeans: interaction contrast with continuous variable - same se, t- and p-values?

I am analysing my own data with a linear mixed model and estimated marginal means and have made a strange observation. I have run an experimental study with three treatment groups, measuring a ...
Fabi's user avatar
  • 65

1
2 3 4 5
7