Description Usage Arguments Details Value See Also
iptw
calculates propensity scores for sequential treatments 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 17 18 19 20 21 22 23 24  iptw(
formula,
data,
timeInvariant = NULL,
cumulative = TRUE,
timeIndicators = NULL,
ID = NULL,
priorTreatment = TRUE,
n.trees = 10000,
interaction.depth = 3,
shrinkage = 0.01,
bag.fraction = 1,
n.minobsinnode = 10,
perm.test.iters = 0,
print.level = 2,
verbose = TRUE,
stop.method = c("es.max"),
sampw = NULL,
version = "gbm",
ks.exact = NULL,
n.keep = 1,
n.grid = 25,
...
)

formula 
Either a single formula (long format) or a list with formulas. 
data 
The dataset, includes treatment assignment as well as covariates. 
timeInvariant 
An optional formula (with no lefthand variable) specifying timeinvariant chararacteristics. 
cumulative 
If 
timeIndicators 
For long format fits, a vector of times for each observation. 
ID 
For long format fits, a vector of numeric identifiers for unique analytic units. 
priorTreatment 
For long format fits, includes treatment levels from previous times if 
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 
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 
... 
Additional arguments that are passed to ps function. 
For user more comfortable with the options of xgboost
],
the options for iptw
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
.
Returns an object of class iptw
, a list containing
psList
A list of ps
objects with length equal to the number of time periods.
estimand
The specified estimand.
stop.methods
The stopping rules used to optimize iptw
balance.
nFits
The number of ps
objects (i.e., the number of distinct time points).
uniqueTimes
The unique times in the specified model.
ps
, mnps
, gbm
, xgboost
, plot
, bal.table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.