I am using the lsmeans/emmeans
package in R to create a plot of pairwise comparisons in the response between levels of treatA (binary/factor variable). I can get the difference estimates using lsmeans (contrast), but it only provides the SE for the estimates, not the confidence limits. Confidence limits are only provided for the individual effects, not the contrasts. Can anyone help generate CL for the mean differences (contrasts)?
model = glmer.nb(response ~ treatA * treatB + (1|random), data, family=nbinom1)
lsm <- lsmeans(model, pairwise ~ treatA*treatB)
contrast(lsm, method = "pairwise")
I am ultimately hoping to make a plot like this, but with CL instead of SE.
Look at the documentation for more details