weights_odds: Estimates odds weights for the Ypred estimator

View source: R/A3-weights_odds.R

weights_oddsR Documentation

Estimates odds weights for the Ypred estimator

Description

Estimates odds weights for the Ypred estimator

Usage

weights_odds(
  data,
  s.wt.var = NULL,
  cross.world = "10",
  a.form,
  max.stabilized.wt = 30,
  plot = TRUE,
  vars.order = NULL,
  vars.std = NULL
)

Arguments

data

A data frame.

s.wt.var

Optional, name of variable containing sampling weights.

cross.world

The cross-world condition involved in the effect decomposition of choice. Should be "10" if want the (NDE0, NIE1) pair, "01" if want the (NIE0, NDE1) pair, or "both" if want both decompositions.

a.form

Formula for model of treatment given the variables that need to be balanced.

max.stabilized.wt

Max stabilized weight allowed. Larger weights are truncated to this level. Default is 30.

plot

Whether to output weight distribution and balance plots. Defaults to TRUE.

vars.order

Order in which variables are to appear in the balance plot. If not specify, use the order that appears in a.form.

vars.std

Variables whose mean differences are to be standardized in balance plot. Ignore if plot==FALSE.

Value

w.dat A data frame for the pseudo and actual subsamples (pseudo ones with estimated distribution-morphing odds weights)
wt.dist.plot If plot==TRUE, a density plot of the distribution-morphing weights, and (if sampling weights vary) a density plot of the final weights
balance.plot If plot==TRUE, a plot of the balance in covariates and mediators of the pseudo subsample(s).

See Also

Other weighting schemes: weights_ipw(), weights_med()


trangnguyen74/tnMediation documentation built on May 3, 2023, 6:58 a.m.