neWeight: Expand the dataset and calculate ratio-of-mediator...

neWeightR Documentation

Expand the dataset and calculate ratio-of-mediator probability weights

Description

This function both expands the data along hypothetical exposure values and calculates ratio-of-mediator probability weights.

Usage

neWeight(object, ...)

Arguments

object

an object used to select a method.

...

additional arguments.

Details

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).

Value

A data frame of class c("data.frame", "expData", "weightData"). See expData for its structure.

References

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.

See Also

neWeight.default, neWeight.formula, expData


jmpsteen/medflex documentation built on July 6, 2023, 8 p.m.