View source: R/A1-weights_med.R
weights_med | R Documentation |
Estimates inverse probability weights that form pseudo treated and control samples and cross-world weights that form (one or two) pseudo cross-world samples.
weights_med(
data,
s.wt.var = NULL,
cross.world = "10",
a.c.form,
a.cm.form,
max.stabilized.wt = 30,
plot = TRUE,
c.order = NULL,
m.order = NULL,
c.std = NULL,
m.std = NULL
)
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.c.form |
Formula for the P(A|C) model (the propensity score model). |
a.cm.form |
Formula for the P(A|C,M) model. |
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. |
c.order |
Order in which covariates are to be plotted. If not specify, use the order that appears in |
m.order |
Order in which mediators are to be plotted. If not specify, use the order that appears in |
c.std |
Covariates whose mean differences are to be standardized in balance plot. Ignore if |
m.std |
Mediators whose mean differences are to be standardized in balance plot. Ignore if |
A list including
w.datA data frame for the pseudo samples with estimated weights.
plot.wtsA plot of the distributions of the weights.
plot.balanceA plot of the balance in covariates and mediators of the pseudo samples.
Other weighting schemes:
weights_ipw()
,
weights_odds()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.