marginal_effects.Rd
Get all marginal effects of variables in the fit
marginal_effects(fit, type = "mea", variable = "all", data = NA, trim = 0.05)
model fitted by qs()
one of "ame" (average marginal effects) or "mea" (marginal effects at the average)
which variable to calculate marginal effects on
optional data.frame that specifies level of data to calculate marginal effects
What to trim the variable of interest at, 0 < trim < 0.5
The trim defaults to using the 95th percentile instead of the max because there may be large outliers. You can over-ride by setting trim to 0, which will use the min and max. By default, marginal effects will calculate marginal effects for all variables.