Skip to main content

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
0 answers
16 views

Compute marginal means and effect sizes with a fixed effect linear model with repeated measures

I am trying to better understand the relationship between linear models and ANOVA by doing it a bit more manually. To do this: I create a toy dataset, with two categorical variables, which I consider ...
Charly Marie's user avatar
1 vote
0 answers
28 views

Degrees of Freedom in Emmeans

I am using the 'emmeans' package in R to compute estimated marginal means for my (liner mixed-effects) model. However, I am enountering a warning message related to the number of observations ...
babygould's user avatar
0 votes
0 answers
23 views

post-hoc test for multinomial logistic regression brm model (categorical response)

I apologise as I am very new to this package and I really appreciate any help I can get. I have a brms model with a categorical response variable (Species) with the ...
user avatar
0 votes
1 answer
25 views

Missing category in an interaction in emmeans, can I obtain the global marginal means for a level of a factor?

I have a dataset with measures coming from two environments from five different cities. On one of those cities we could not get measurements for one of those environments. When running ...
DMenG's user avatar
  • 1
1 vote
1 answer
74 views

Interpreting letters from cld output from emmeans R

I normally assign the letters for pairwise comparisons of the estimated marginal means manually. However, I wanted to use cld from multcomp as an alternative. I tried on a smaller dataset; however, ...
Elaine's user avatar
  • 11
0 votes
1 answer
39 views

Post-hoc for GLMM with polynomials/splines

I'm trying to do a post-hoc on my GLMM but I'm not sure I'm doing it right. I test the effect of continuous variables X and Y on a binary response Z with my IDs as a random effect with this code: <...
P. Vauclin's user avatar
1 vote
1 answer
55 views

Estimated marginal trends after regression of isometric log ratio transformed compositional data

I have longitudinal compositional data with four base response variables. I would like to compare the slopes of groups across time, but not for the ilr-transformed composition. I wish to compare the ...
Bryan's user avatar
  • 1,109
0 votes
1 answer
38 views

What is bhat from emmeans in clm ordinal models? And how does it relate to the model coefficients?

I am researching how ordinal models work in conjunction with marginal means. I am stuck with understanding a particular part of the emmeans output, specifically what bhat contains when building an ...
SamPassmore's user avatar
0 votes
0 answers
22 views

Contrasts by each categorical factor or by all?

I have the following model: Cmic_mg_cm2 ~ group*sample_date + mean_ph + mean_shan_veg + mean_tree_shandiv + (1|plot) with both group and sample_date ...
Eco_Analysis's user avatar
1 vote
0 answers
231 views

Can raw means and estimated marginal means be the same ? And when?

I have read a lot about calculating raw (standard) means and EMM. First are data based (descriptive stats), the latter are model based. I try to learn how to calculate both of them. In my example both ...
Andrzej Andrzej's user avatar
0 votes
0 answers
39 views

Effect size for marginal means of a model with an interaction term

I'm wondering what is the correct way to calculate the eff_size() of a lmer model with an interaction term. I'm following this ...
Larissa Cury's user avatar
1 vote
0 answers
41 views

emmeans differences in logistic regression give wrong significance in case of complete separation

Suppose (fictitious example) we have a logistic model for dependent "Happy" (0/1), and factor "Age" ("young", "middle", "old") as independent variable ...
BenP's user avatar
  • 1,818
0 votes
0 answers
13 views

Estimated marginal means with afex::lmer - handling of random intercepts

I am fitting a very simple model where group, time and id are factors: ...
Olivier R's user avatar
2 votes
1 answer
92 views

Am I using emmeans correctly to look at pairwise differences after running a type III ANOVA model?

I am looking at how the weight of female individuals is influenced by the two factors A (5 levels) and B (2 levels) using a type III ANOVA as follows: ...
Insect_biologist's user avatar
1 vote
1 answer
43 views

compare contrasts from different models with emmeans

I'm trying to compare two contrasts from different models (each model from data from different individuals), and I'm wondering if that is possible using the estimate, SE and t.ratio information from ...
locus's user avatar
  • 1,633
0 votes
0 answers
37 views

Post-hoc tests of interaction for a negative binomial regression with survey weights?

I ran a negative binomial regression with survey weights using the R package survey and the function svyglm() and observed a ...
Chernoff's user avatar
  • 308
0 votes
0 answers
29 views

How to account for relative frequency in a generalized linear mixed model?

I have a dataset of scan sampling done on animals in intervals of 20 minutes. Each observation, an animal is categorized by category 1 (A, B, C, D, or E) and by category 2 (1, 2, 3, or 4). I am trying ...
user avatar
0 votes
0 answers
19 views

How can I add the z-score and its confidence interval from an estimate using emmeans?

I'm trying to add to the following model the z-score value and its confidence interval after using the emmeans package. The model: ...
Javi's user avatar
  • 1
2 votes
1 answer
79 views

Is emmeans back-transforming correctly?

I am investigating a significant 3-way interaction and I am not sure I am using emmeans correctly. When I pass the model to emmeans with type =response it says it ...
DS14's user avatar
  • 105
0 votes
0 answers
24 views

Contrasting results between ANOVA (car) and emmeans

I conducted an experiment involving two forest plots: one that experienced a fire and another that remained unburned. Each plot was further divided into two regions: the edge and the interior. My ...
Jefferson Bruno Bretas's user avatar
0 votes
0 answers
20 views

Incomplete formula for the glm negative binomial

My data is about the number of insects that go to treatment 1 or treatment 2, and I have the factor place, with four levels (places). Each place has a treatment and ...
Yahana Aparicio's user avatar
3 votes
2 answers
42 views

Logic behind writing custom planned contrasts for a triple interaction

I have a model with a triple interaction involving two factors and one continuous variable. Replicable example: ...
Maurice Pasternak's user avatar
2 votes
0 answers
50 views

Computing Bayes Factors for pairwise comparisons, linear mixed models

A reviewer asked for either Bayes Factors or effect sizes for pairwise, planned comparisons in linear mixed modeling. In the experimental design, I have 30 participants, one fixed factor (repeated ...
Elizabeth's user avatar
  • 135
2 votes
1 answer
170 views

Help understanding Cohen's D for pairwise comparisons in lme

I've been asked by a reviewer to provide effect sizes for pairwise, planned comparisons. In the experimental design, I have one fixed factor with three conditions (Consistency). Passage & Subject ...
Elizabeth's user avatar
  • 135
1 vote
1 answer
79 views

Predicted probabilities from logistic vs log-binomial model

I am giving a talk on logistic regression and I was going to mention log-binomial models to estimate risk-ratios. I understand the difference between odds and probabilities and that they only converge ...
LucaS's user avatar
  • 771
6 votes
1 answer
114 views

Mean change scores analysis for studying natural course of disease

I investigating how vision (amongst other outcomes) changes over time, assessed at time 0, week 12 and week 24 in an observational cohort, and wanted to obtain the mean change values at each time ...
s.stats's user avatar
  • 477
0 votes
1 answer
54 views

Confidence Intervals Overlaping Although Significant Effects in glmer in R

Below is the output of a glmer: ...
Abbie Hutton's user avatar
0 votes
0 answers
23 views

Is it right to call the values produced by emmeans coefficicents?

I have a logistic regression model with a categorical predictor with five levels. I compute emmeans for the model, splitting by my categorical predictor. ...
user399309's user avatar
0 votes
1 answer
425 views

Significant pairwise comparisons from emtrends but marginal means are not-significant?

I'm quite new to this type of statistical analysis, so apologies if the question comes across as silly. I'm currently fitting a mixed lmer with two categorical (condition and outcome; each with 2 ...
Karisima_Jo's user avatar
6 votes
1 answer
378 views

multicomp package and emmeans package produce different adjust pvalues for Dunnett procedure [closed]

For Dunnett adjustment, multicomp package and emmeans package in R give different results. Anyone knows why? Thanks. Please see ...
user13154's user avatar
  • 1,173
0 votes
0 answers
27 views

Back-transform binomial and betabinomial to counts with emmeans

My first outcome is a bounded count (range = 0-5, not zero-inflated, not overdispersed), so I specified a model using a successes-failures matrix and a binomial distribution: ...
bcarothers's user avatar
2 votes
1 answer
331 views

How to interpret odds ratios by emmeans for glmmTMB-beta

I fit this mixed model with beta for the response variable: photochemical efficiency or Fv/Fm and the predictor variables are categorical: ...
Franelibethgalvez's user avatar
2 votes
0 answers
82 views

Estimated means for groups based on continous predictor in GAMM

I have fitted a GAMM using the mgcv package in R. The predictor age is a continous variable and is included with a smooth function in the model. ...
Knut Anders's user avatar
1 vote
1 answer
602 views

Emmeans, pairs, contrasts, and all different p-values

The main regression formula I am using is as follows (Both the Group and Time variables are binary): ...
KLee's user avatar
  • 335
2 votes
1 answer
232 views

interpretation of trends in ordinal regression with emmeans

I'm using emmeans to extract trends from an interaction of two factors, one categorical (temp) and one continuous (...
locus's user avatar
  • 1,633
4 votes
1 answer
369 views

Is it appropriate to present predicted probabilities from emmeans for a mixed-effects binomial logistic regression?

I am trying to understand how to analyze data for a generalized mixed model (GLMM) with a binary response. I am interested in visualizing the predicted probabilities, as well as a measure of effect ...
user398696's user avatar
1 vote
0 answers
75 views

Compare quadratic coefficients between group levels from mixed effects model?

I'm hoping I can find some advice on this question. I have repeated measures of an outcome variable yvar where the trend over ...
Jem Arnold's user avatar
0 votes
0 answers
53 views

3 way interaction in linear mixed model with 2 continous and 1 categorical predictors

I want to know if the relationship between x (continuous independent variable) and y (continuous dependent variable) is influenced by gender (binary variable) AND stronger for those participants who ...
Mika2019's user avatar
0 votes
1 answer
119 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
  • 111
0 votes
0 answers
39 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
246 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
  • 551
0 votes
1 answer
53 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
237 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
58 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
210 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
  • 577
1 vote
1 answer
117 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
  • 11
1 vote
0 answers
200 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
304 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
655 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
181 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

1
2 3 4 5
8