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.
352
questions
0
votes
0
answers
21
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 ...
1
vote
0
answers
31
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 ...
0
votes
0
answers
26
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 ...
0
votes
1
answer
27
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 ...
1
vote
1
answer
78
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, ...
0
votes
1
answer
40
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:
<...
1
vote
1
answer
56
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 ...
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 ...
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 ...
1
vote
0
answers
233
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 ...
0
votes
0
answers
41
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 ...
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 ...
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:
...
2
votes
1
answer
94
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:
...
1
vote
1
answer
45
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 ...