mnps  R Documentation 
mnps
calculates propensity scores for more than two treatment groups using gradient boosted
logistic regression, and diagnoses the resulting propensity scores using a variety of methods.
mnps(
formula,
data,
n.trees = 10000,
interaction.depth = 3,
shrinkage = 0.01,
bag.fraction = 1,
n.minobsinnode = 10,
perm.test.iters = 0,
print.level = 2,
verbose = TRUE,
estimand = "ATE",
stop.method = c("es.max"),
sampw = NULL,
version = "gbm",
ks.exact = NULL,
n.keep = 1,
n.grid = 25,
treatATT = NULL,
...
)
formula 
A formula for the propensity score model with the treatment indicator on the left side of the formula and the potential confounding variables on the right side. 
data 
The dataset, includes treatment assignment as well as covariates. 
n.trees 
Number of gbm iterations passed on to 
interaction.depth 
A positive integer denoting the tree depth used in gradient boosting. Default: 3. 
shrinkage 
A numeric value between 0 and 1 denoting the learning rate.
See 
bag.fraction 
A numeric value between 0 and 1 denoting the fraction of
the observations randomly selected in each iteration of the gradient
boosting algorithm to propose the next tree. See 
n.minobsinnode 
An integer specifying the minimum number of observations
in the terminal nodes of the trees used in the gradient boosting. See 
perm.test.iters 
A nonnegative integer giving the number of iterations
of the permutation test for the KS statistic. If 
print.level 
The amount of detail to print to the screen. Default: 2. 
verbose 
If 
estimand 

stop.method 
A method or methods of measuring and summarizing balance across pretreatment
variables. Current options are 
sampw 
Optional sampling weights. 
version 
Default: 
ks.exact 

n.keep 
A numeric variable indicating the algorithm should only
consider every 
n.grid 
A numeric variable that sets the grid size for an initial
search of the region most likely to minimize the 
treatATT 
If the estimand is specified to be ATT, this argument is used to specify which treatment condition is considered 'the treated'. It must be one of the levels of the treatment variable. It is ignored for ATE analyses. 
... 
Additional arguments that are passed to 
For user more comfortable with the options of xgboost
,
the options for mnps
controlling the behavior of the gradient boosting
algorithm can be specified using the xgboost
naming
scheme. This includes nrounds
, max_depth
, eta
, and
subsample
. In addition, the list of parameters passed to
xgboost
can be specified with params
.
Note that unlike earlier versions of twang
, the plotting functions are
no longer included in the mnps
function. See plot
for
details of the plots.
Returns an object of class mnps
, which consists of the following.
psList
A list of ps
objects with length equal to the number of time periods.
nFits
The number of ps
objects (i.e., the number of distinct time points).
estimand
The specified estimand.
treatATT
For ATT fits, the treatment category that is considered "the treated".
treatLev
The levels of the treatment variable.
levExceptTreatAtt
The levels of the treatment variable, excluding the treatATT
level.
data
The data used to fit the model.
treatVar
The vector of treatment indicators.
stopMethods
The stopping rules specified in the call to mnps
.
sampw
Sampling weights provided to mnps
, if any.
Lane Burgette '<burgette@rand.org>', Beth Ann Griffin '<bethg@rand.org>', Dan Mc Caffrey '<danielm@rand.org>'
Dan McCaffrey, G. Ridgeway, Andrew Morral (2004). "Propensity Score Estimation with Boosted Regression for Evaluating Adolescent Substance Abuse Treatment", *Psychological Methods* 9(4):403425.
ps
, gbm
, xgboost
, plot
, bal.table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.