This function both expands the data along hypothetical exposure values and calculates ratio-of-mediator probability weights.
neWeight(object, ...)
A data frame of class c("data.frame", "expData", "weightData")
. See expData
for its structure.
an object used to select a method.
additional arguments.
Generic function that both expands the data along hypothetical exposure values and calculates ratio-of-mediator probability weights
$$\frac{\hat P(M_i \vert X_i = x^*, C_i)}{\hat P(M_i \vert X_i = x, C_i)}$$
for each observation unit i in this expanded dataset in a single run.
These weights are ratios of probabilities or probability densities from the mediator model distribution, which can be specified either externally as a fitted model object (neWeight.default
)
or internally (neWeight.formula
).
Hong, G. (2010). Ratio of mediator probability weighting for estimating natural direct and indirect effects. In Proceedings of the American Statistical Association, Biometrics Section, pp. 2401-2415. American Statistical Association, Alexandria, VA.
Lange, T., Vansteelandt, S., & Bekaert, M. (2012). A Simple Unified Approach for Estimating Natural Direct and Indirect Effects. American Journal of Epidemiology, 176(3), 190-195.
neWeight.default
, neWeight.formula
, expData