Computes mediation weights for either binary or multinomial mediators. The important part is that the influence functions can be obtained to compute standard errors.
medweight(
fit,
data = data,
var = NULL,
name.weight = "weights",
id.name = "id",
...
)
either glm-binomial or mlogit (mets package)
data frame with data
is NULL reads mediator and exposure from formulae in the fit.
name of weights
name of id variable, important for SE computations
Additional arguments to
Thomas Scheike