Skip to content

Use of emmean's option 'simple' #47

@luisrmacias

Description

@luisrmacias

Hello.
I've found the package very useful but now I stumbled on something I consider a bug.

Say I have a model like this:
rt <- art(score ~ site*fsex + (1|patid), data = tofit)
were 'score' is a disease score, 'site' is a body region, 'fsex' is sex coded as factor and 'patid' is the patient ID.
I'm interested in the contrast of each site by sex. Say 'arm/male - arm/female'

If a use a linear model and the steps after
lm <- lmerTest::lmer(score ~ sitefsex + (1|patid), data = tofit)
LEMM <- emmeans(lm, ~ site:fsex)
pairs(LEMM, simple="fsex")
I get what I want. Whereas,
rt <- art(score ~ site
fsex + (1|patid), data = tofit)
EMM <- emmeans(rtlm, ~ sitefsex)
pairs(EMM, simple="fsex")
Will give me only NA's. I believe this is because LEMM has a 'site' column and an 'fsex' column, whereas in EMM these columns are combined into 'sitefsex'.
If there's a workaround for this I would be happy to know.

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