Description Usage Arguments Value References See Also Examples
ps.xgb
calculates propensity scores using gradient boosted logistic
regression and diagnoses the resulting propensity scores using a variety of
methods
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
formula |
An object of class formula: a symbolic description of the propensity score model to be fit with the treatment indicator on the left side of the formula and the variables to be balanced on the right side. |
strata |
An optional factor variable identifying the strata. If specified, balance is optimized within strata. |
data |
A dataset. |
params |
xgboost parameters. |
file |
An optional character string naming a file to save intermediate results. |
max.steps |
An integer specifying the maximum number of steps to take.
Note that |
iters.per.step |
An integer specifying the number of iterations to add
to the model at each step of algorithm. Note that |
id.var |
A variable that uniquely identifies observations. |
min.iter |
An integer specifying the minimum number of iterations before checking for convergence.
Note that |
min.width |
An integer specifying the minimum number of iterations between the current
number of iterations and the optimal value. Default: |
verbose |
A logical value indicating if the function should update the user on its progres Default: TRUE. |
save.model |
A logical value indicating if the xgboost model be saved as part of the output object. Default: FALSE. |
weights |
An optional variable that identifies user defined weights to be incorporated into the optimization. |
linkage |
An indicator of whether the weighting should be for linkage failure (or nonresponse) versus comparison group construction. A value of TRUE requests weighting to account for linkage failure, while a value of FALSE requests weighting for comparison group construction. Default: TRUE. |
Returns an object of class ps.xgb
, a list containing
bal.tab
A table summarizing the balance at the optimal number of iterations.
es
A table summarizing the standardized differences within strata at the optimal number of iterations.
es.max
A table summarizing the maximum absolute standardized difference by strata.
es.mean
A table summarizing the mean absolute standardized difference by strata.
iter.per.step
Saves the value of iters.per.step
specified by the user.
opt.iter
The optimal number of iterations.
strata
A list of the strata used in the optimization.
weight.data
A dataset containing the unique ID and the optimal weight for each observation.
Dan McCaffrey, G. Ridgeway, Andrew Morral (2004). "Propensity Score Estimation with Boosted Regression for Evaluating Adolescent Substance Abuse Treatment", Psychological Methods 9(4):403-425.
twang::ps, xgboost
1 | # See the vignette for examples.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.