# NOT RUN {
warp.lm <- lm(breaks ~ wool * tension, data = warpbreaks)
emmeans (warp.lm, ~ wool | tension)
# or equivalently emmeans(warp.lm, "wool", by = "tension")
# 'adjust' argument ignored in emmeans, passed to contrast part...
emmeans (warp.lm, poly ~ tension | wool, adjust = "sidak")
# }
# NOT RUN {
# 'adjust' argument NOT ignored ...
emmeans (warp.lm, ~ tension | wool, adjust = "sidak")
# }
# NOT RUN {
# }
# NOT RUN {
### Offsets: Consider a silly example:
emmeans(warp.lm, ~ tension | wool, offset = c(17, 23, 47)) @ grid
# note that offsets are recycled so that each level of tension receives
# the same offset for each wool.
# But using the same offsets with ~ wool | tension will probably not
# be what you want because the ordering of combinations is different.
### Conflicting arguments...
# This will error because 'tran' is passed to both ref_grid and update
emmeans(some.model, "treatment", tran = "log", type = "response")
# Use this if the response was a variable that is the log of some other variable
# (Keep 'tran' from being passed to ref_grid)
emmeans(some.model, "treatment", options = list(tran = "log"), type = "response")
# This will re-grid the result as if the response had been log-transformed
# ('transform' is passed only to ref_grid, not to update)
emmeans(some.model, "treatment", transform = "log", type = "response")
# }
Run the code above in your browser using DataLab