Calculate propensity score weights
Usage
wt_ate(.propensity, ...)
# S3 method for numeric
wt_ate(
.propensity,
.exposure,
.sigma = NULL,
exposure_type = c("auto", "binary", "categorical", "continuous"),
.treated = NULL,
.untreated = NULL,
stabilize = FALSE,
stabilization_score = NULL,
...
)
wt_att(.propensity, ...)
# S3 method for numeric
wt_att(
.propensity,
.exposure,
exposure_type = c("auto", "binary", "categorical", "continuous"),
.treated = NULL,
.untreated = NULL,
...
)
wt_atu(.propensity, ...)
# S3 method for numeric
wt_atu(
.propensity,
.exposure,
exposure_type = c("auto", "binary", "categorical", "continuous"),
.treated = NULL,
.untreated = NULL,
...
)
wt_atm(.propensity, ...)
# S3 method for numeric
wt_atm(
.propensity,
.exposure,
exposure_type = c("auto", "binary", "categorical", "continuous"),
.treated = NULL,
.untreated = NULL,
...
)
wt_ato(.propensity, ...)
# S3 method for numeric
wt_ato(
.propensity,
.exposure,
exposure_type = c("auto", "binary", "categorical", "continuous"),
.treated = NULL,
.untreated = NULL,
...
)
Arguments
- .propensity
Either a vector of the predicted value of
.exposure
or adata.frame
where each column is the predicted probability of a level of.exposure
.- ...
Passed to other functions Not currently used.
- .exposure
The exposure for which
.propensity
is calculated.- .sigma
If
exposure_type
is continuous, a vector of observation-level standard errors passed todnorm()
. For anlm
model this isinfluence(model)$sigma
. For data frames produced by broom'saugment()
, this is the.sigma
column.- exposure_type
The type of exposure. By default, automatically detected based on
.exposure
.- .treated
The treatment level of the exposure. Automatically detected by default.
- .untreated
The control level of the exposure. Automatically detected by default.
- stabilize
Logical. Stabilize the weights? By default, stabilizes with the mean of
.exposure
.- stabilization_score
if
stabilize
isTRUE
, optionally include a score by which to stabilize the score, e.g. the predicted values from a regression model with no predictors.