View source: R/A2-weights_ipw.R
weights_ipw | R Documentation |
This function estimates weights that form two pseudo treated and pseudo control samples (as if for total effect estimation)
weights_ipw(
data,
s.wt.var = NULL,
a.form,
max.stabilized.wt = 30,
plot = TRUE,
vars.std = NULL,
vars.order = NULL
)
data |
A data frame. |
s.wt.var |
Optional, name of variable containing sampling weights. |
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.std |
Variables whose mean differences are to be standardized in balance plot. Ignore if |
vars.order |
Order in which variables are to appear in the balance plot. If not specify, use the order that appears in |
A list including
w.dat | A data frame for the pseudo samples with estimated weights. |
plot.wts | A plot of the distributions of the weights. |
plot.balance | A plot of the balance in covariates and mediators of the pseudo samples. |
Other weighting schemes:
weights_med()
,
weights_odds()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.