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
1
vote
1answer
24 views

How are contrasts tested when using estimated marginal means?

Forgive me for this, but I just can't work it out. Some dummy data : ...
1
vote
1answer
67 views

interactions involving two continuous predictors with emtrends

Let's say I have a model with two continuous predictors (nitrogen and temperature) and one categorical variable (variety). <...
0
votes
0answers
24 views

Why are the confidence intervals so large for the difference of differences?

I have run a generalized linear mixed effects model with the glmmTMB package to determine if there is an interaction between two categorical predictors, treatment and location, in predicting the ...
1
vote
2answers
34 views

Units of emmeans output?

I have values of relative humidity on a scale of 0 to 1 (e.g., 0.9 = 90% RH). I also have two cities (A or B). My model is as follows: ...
0
votes
1answer
16 views

How to address a detected nesting structure using emmeans

I'm analysing the results of a M BACI experiment. When trying to estimate means using emmeans, I'm getting this message: NOTE: A nesting structure was detected in the fitted model: BurnType %...
2
votes
1answer
25 views
0
votes
0answers
10 views

Why are my emmeans SE so large, but pairwise comparison SE are modest?

I constructed a glm logistic regression model for a binary response with two categorical predictors. I am calculating the emmeans for one of the two predictors, ...
0
votes
2answers
35 views

Understanding cov.reduce argument in emmeans function

I would appreciate any help regarding emmeans package. I am fitting dummy-variable regression model (ANCOVA) with follow-up post hoc test in ...
0
votes
1answer
18 views

Using pairwise comparision on gls object [closed]

I have one factor (tree genotype) and I analyse its influence on soil content. I used gls to aply weights on my data because it's a better fitted model. Here is an exemple of my data with one ...
2
votes
1answer
31 views

Which emmeans to choose between full and main effect mixed effect models with heteroscedasticity corrected

I have a split splot full factorial design : 3 blocks, each block contains 4 plots for factor E and each plot is divided into 3 subplots for factor F. I use a mixed effect model with random effects on ...
1
vote
0answers
17 views

How to interpret Emmeans results

I have used the emmeans() package to calculated the difference between the difference of estimated marginal means. I did this by first calculating the EMMs of location|treatment, and then the ...
0
votes
0answers
22 views

Getting marginal means for ANCOVA in R (effect vs emmeans)

I'm a bit new to running GLM models in R, so forgive me is this is a silly question. Context: I'm running an ANCOVA with the goal to control for multiple covariates while understanding the ...
2
votes
2answers
147 views

Is it appropriate to use estimated marginal means when model estimates are not significant but data is unbalanced?

Is it appropriate to use estimated marginal means when estimates (either interaction or main effects) are not significant but the data is unbalanced? I've come across variations of this question on ...
1
vote
1answer
232 views

How to calculate Tukey-adjusted p-values for emmeans pairwise comparisons?

I would like to calculate Tukey-adjusted p-values for emmeans pairwise comparisons. I know that these can be obtained directly with functions like pairs() and CLD(). However, when there are three ...
1
vote
1answer
80 views

Using emmeans with clmm to look at joint effects

I am running an ordinal model on rating data, with 1 random effect (subject) and 2 fixed effects (condition with 3 levels, probe.position with 6). I use the clmm function from the ordinal package. I ...
0
votes
0answers
180 views

Using pairwise comparison on gls object with heterogeneity of variances?

I'm comparing total yield from fields under 5 different treatments. As you can see, the variance differed between the treatments (diagnostics from lm() fit): So I ...
1
vote
0answers
300 views

Seeking a post-hoc test for zero-inflated glmmTMB [closed]

I am attempting to use glmmTMB modelling zero-inflated count data following the example in Mollie Brooks' and Ben Bolker's paper: https://www.biorxiv.org/content/biorxiv/suppl/2017/05/01/132753.DC1/...
3
votes
0answers
51 views

Negative lower confidence limit in beta regression?

I fitted a beta regression on some proportion data using the betareg() function from the betareg package. The proportion was ...
0
votes
1answer
33 views

Post-hoc comparison using lsmeans paired vs unpaired

I am doing a linear mixed model in R (lmer) to investigate the difference in activity levels (AL) between two disease groups and two kinds of therapy. Additionally, it is repeated measures data, each ...
0
votes
1answer
65 views

Model validity and specific contrasts in mixed model

I have a design where mice are distributed in a two-way anova setup. With genotype (WT and KO) and treatment (Ctrl and Treat). From each mouse 5 different tissues have been extracted and the number of ...
0
votes
2answers
66 views

Multiple comparisons repeated measures group by time interactions, with several time categories

I cannot understand how to analyse a really simple randomised controlled trial in R. I have two groups: Control and Intervention. Say there are 10 subjects in each group. These two groups are ...
1
vote
1answer
154 views

compare differences between conditions with emmeans

With the following model ...
2
votes
2answers
225 views

SE for estimated marginal means

...
7
votes
2answers
105 views

huge difference between estimates of binomial regresssion when including random effect vs when not

I'm trying to estimate the average score for two groups of students. I use a binomial regression model. The total_ans is the total question they've have answered, ...
1
vote
1answer
889 views

emmeans pairwise contrasts result in same output values for all?

First of all, I am a beginner at mixed models, so I beg your patience and advice if this post could be improved. The structure of the data: ...
2
votes
1answer
390 views

How are the degrees of freedom in the emmeans package calculated? - R

Let us look at some sample data for 5 hypothetical subjects. ...
1
vote
1answer
740 views

Interpreting the standard error from emmeans - R

I am using the emmeans package to run post-hoc analysis on linear mixed models. The results provide what I would expect except for the standard error. I run the ...
1
vote
1answer
59 views

Log response ratio of means not agreeing with linear mixed model output

I have a linear mixed model structured like so: Richness~Time*Treatment+(1|Site) Time has two levels (Pre and Post) as does Treatment (Treatment and Control). ...
0
votes
1answer
263 views

Lsmeans output for clmm models (R)

I've fitted a cumulative logit model, where the IV is categorical (different animation models being compared), the DV is ordinal (points on a 1-9 scale), and there are some random effects (subject, ...
0
votes
1answer
221 views

Analysing Repeated Measures RCT study. emmeans / lsmeans estimate and back-transform problems. Approach doubts

Background I am writing a project on a big multicenter RCT study, where subjects are following different dietary patterns for 2 years. I have access to their dietary intakes and I am grouping them in ...
3
votes
2answers
86 views

Why are p-values in clinical trials often based off of LSmeans

Very often I see clinical trials quoting p-values based upon the differences in treatment effects using the LSmeans. To improve my understanding of this I attempted to learn how to calculate LSmeans ...
0
votes
1answer
105 views

Different results from poisson glmer and glmmadmb when using emmeans (lsmeans)

Why would I be getting drastically different results from glmer and glmmadmbM for the same model when using emmeans? The results from summary() are the same. EMmeans glmer: ...
0
votes
1answer
121 views

Which test does the lsmeans package use to compare the means in pairwise tests and what are its assumptions?

I'm currently using lsmeans to compare the means of various groups using the contrast argument. I'm using data that follows a Gaussian distribution. Would an unbalanced data structure affect the rate ...
0
votes
1answer
69 views

Why the degree of freedom is NA ? And why the p value is calculated when the df is NA?

I used R to do the statistical analysis. After running a glm model, I used Anova function to look at the p value for each explanatory variable. So far, everything was normal. However, when I used ...
0
votes
2answers
247 views

Test for effects of categorical variables on a binary response variable considering their interactions?

i am looking for a test similar to a 2-way ANOVA that would work on a binary response variable. My response variable is presence/absence of plant species. My explanatory variables are Treatment (3 ...
0
votes
1answer
192 views

least square means for GLMM ANOVA

I'm using glm with family=Gamma(link=identity) for gamma distributed data, where I am comparing variance across groups and their ...
4
votes
1answer
209 views

What are LS means useful for?

I have recently learned about LS means (estimated marginal means, predicted marginal means) and I am trying to understand what they could be used for and under what circumstances. For concreteness, ...
0
votes
1answer
800 views

Calculating Estimated Marginal Means from univariate data

I am trying to calculate the estimated marginal means (aka least squared means) in R in order to do statistical analysis for a univariate dataset and am struggling as all the examples are from ...
0
votes
1answer
38 views
3
votes
2answers
218 views

How can I program correction for multiple comparisons using lsmeans in R while not correcting for more than necessary

I posted this question on stack overflow here enter link description here but did not get useful feedback. So, I'll post it again here, in the hopes that this is a better venue for it. I'm wondering ...
1
vote
1answer
302 views

Calculating ratios for contrasts after lmer model

I have performed lmer on my data and, to be generic, my model has 3 fixed effects (A,B,C) and 3 nested random effects (d,e,f) following the response variable y: <...
0
votes
1answer
245 views

Post-hoc test results from GLMM seem to contradict lsmeans estimates

I've conducted a GLMM on some zero-inflated pollinator count data using the glmmadmb() function. Here is the model, in which the counts are in the variable Total, fixed effects include mean ...
0
votes
1answer
174 views

How to provide CI for prediction for mixed model? lsmeans vs predictInterval

I have a linear mixed model, say: y ~ x1 + .. + xn + (1|person) I would like to have a Confidence interval for the prediction, so I would like to say: if x1=3 and x2=6, etc, and ignoring the random ...
2
votes
1answer
78 views

Why doesn't the confidence interval get wider in covariate adjusted pairwise comparisons?

Confidence intervals on means in regression widen as predictions approach the edges of model fit. My intuition then leads me to believe that if I do pairwise comparisons using my model, adjusting for ...
1
vote
1answer
272 views

Post hoc for a specific variable part of an interaction, linear mixed model, r

There are many posts about post hoc testing but I did not find an answer to my question. my model: mod<-lmer(T ~ A*B + C + (1|D), REML=TRUE, data=dat) <...
1
vote
1answer
93 views

Can I fit a linear model if the dependent variable is categorical and has only two values, instead of doing a t test?

Question Is it correct to test the difference of a measurement between groups using generalized least squares? Example My data looks like this: I perform a gls ...
2
votes
1answer
5k views

Pairwise comparisons of contrasts from lsmeans - p value adjustment

I need assistance with interpreting the outcome of my pairwise comparisons from my datasets. I've been running a glmer mixed models and selecting the best model using the AIC criteria. This is the ...
1
vote
1answer
1k views

Standard error all the same in lsmeans on a mixed model [duplicate]

I am running lsmeans to determine the means and standard error for each group within a 4x3 experiment, consisting of three subject types and four treatments. When I run the following it does display ...
0
votes
2answers
288 views

lsmeans R package: how to obtain exact pvalue question when doing a pairwise comparision

I'm using the lsmeans R package, and I'm doing a simple pairwise comparison between two groups. Is there a way to get the exact ...
2
votes
0answers
301 views

How to do GEE with LS means in R

I've done a GEE analysis for a dataset in SPSS and I want to replicate the analysis in R, but I'm fairly new to R so I'm not sure how to do it. Here's a list of all the things I included in SPSS: ...