[X] a suggested code or documentation change, improvement to the code, or feature request
It would be nice to have the ability to calculate contrasts. For example, the following calculates average marginal effects of wt at am = 0 and am = 1.
library("margins")
fm <- lm(vs ~ wt * factor(am), data = mtcars)
margins(fm, variables = "wt", at = list(am = c(0, 1)))
It would be nice to have the possibility to compare the marginal effect of wt between the levels of am by calculating a contrast (including SE).
Please specify whether your issue is about:
It would be nice to have the ability to calculate contrasts. For example, the following calculates average marginal effects of
wt
atam = 0
andam = 1
.It would be nice to have the possibility to compare the marginal effect of
wt
between the levels ofam
by calculating a contrast (including SE).