Skip to content

Pairwise Comparisons Alike Emmeans with Lmercens #6

@brianfcase

Description

@brianfcase

Matthias,

I would like to implement a post hoc pairwise comparison output on a lmercens object like one can perform following a lme4 model output with emmeans ( ) + pair ( ), or simply anova ( ) to extract global F values for categorical fixed effects.

For example:

with lme4, I can do the following (testosterone is a left censored response variable below, and thus want to utilize lmercens as I do below with lme4). Pit is a unique individual identifier that needs to be accounted for with random effects. Outcome and period are both categorical variables (outcome: n = 3), (period: n = 4).

lmer_t <- lmer(testosterone ~ period * outcome + (1|pit), data = parent_t0, REML = FALSE)
summary(lmer_t) #for model output

THEN --
anova(lmer_t) #to get global F values for period and outcome (both categorical variables)
pairwise<-emmeans(lmer_t,"outcome","period")
pairs(pairwise) #to extract pairwise comparisons between outcome, nested within the group of period

With the lmercens object, I can't perform these anova ( ) or emmeans / pairs pairwise comparisons.

Is there a way to perform pairwise comparisons with a lmercens model with multiple categorical variables that are nested within each other, alike one would perform with emmeans?

Many thanks for any insights you might be able to provide !

Brian Case
PhD Candidate
Virginia Tech
Blacksburg, VA USA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions