# mnps: Propensity score estimation In twang: Toolkit for Weighting and Analysis of Nonequivalent Groups

## Description

`mnps` calculates propensity scores and diagnoses them using a variety of methods, but centered on using boosted logistic regression as implemented in `gbm`

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15``` ``` mnps(formula = formula(data), data, n.trees = 10000, interaction.depth = 3, shrinkage = 0.01, bag.fraction = 1.0, perm.test.iters=0, print.level = 2, iterlim = 1000, verbose = TRUE, estimand = "ATE", stop.method = "es.max", sampw = NULL, treatATT = NULL, ...) ```

## Arguments

 `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 `gbm` `interaction.depth` `interaction.depth` passed on to `gbm` `shrinkage` `shrinkage` passed on to `gbm` `bag.fraction` `bag.fraction` passed on to `gbm` `perm.test.iters` a non-negative integer giving the number of iterations of the permutation test for the KS statistic. If `perm.test.iters=0` then the function returns an analytic approximation to the p-value. Setting `perm.test.iters=200` will yield precision to within 3% if the true p-value is 0.05. Use `perm.test.iters=500` to be within 2% `print.level` the amount of detail to print to the screen `iterlim` maximum number of iterations for the direct optimization `verbose` if TRUE, lots of information will be printed to monitor the the progress of the fitting `estimand` The causal effect of interest. Options are `"ATE"` (average treatment effect), which attempts to estimate the change in the outcome if the treatment were applied to the entire population versus if the control were applied to the entire population, or `"ATT"` (average treatment effect on the treated) which attempts to estimate the analogous effect, averaging only over the treated population. `stop.method` A method or methods of measuring and summarizing balance across pretreatment variables. Current options are `ks.mean`, `ks.max`, `es.mean`, and `es.max`. `ks` refers to the Kolmogorov-Smirnov statistic and `es` refers to standardized effect size. These are summarized across the pretreatment variables by either the maximum (`.max`) or the mean (`.mean`). `sampw` Optional sampling weights. `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.

## Details

`formula` should be something like "treatment ~ X1 + X2 + X3". The treatment variable should be a variable with three or more levels. There is no need to specify interaction terms in the formula. `interaction.depth` controls the level of interactions to allow in the propensity score model.

Note that — unlike earlier versions of `twang` — plotting functions are no longer included in the `ps()` function. See `plot` for details of the plots.

## Value

Returns an object of class `mnps`, which consists of the following.

 `psList` A list of `ps` objects. `nFits` The number of calls to `ps` that were used to form the `mnps` object. `estimand` The estimand – either ATT or ATE – that was specified in the call to `mnps`. `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 `stop.method` vector specified in the call to `mnps`. `sampw` Sampling weights provided to `mnps`, if any.

## Author(s)

Lane Burgette [email protected], Beth Ann Griffin [email protected], Dan McCaffrey [email protected]

## References

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.

`ps`