doPS {cmprskcoxmsm}  R Documentation 
Generate the Inverse Probability Treatment Weights
Description
doPS
calculates the unstabilized and stabilized inverse probability treatment weights (IPW) for average treatment effect using propensity score. The propensity score is calculated by twang
package using the boosted logistic regression.
Usage
doPS(data,Trt,Trt.name,VARS.)
Arguments
data 
The dataset, includes treatment assignment as well as covariates 
Trt 
The name of the treatment variable in the dataset. 
Trt.name 
The treated group name of the treatment variable in the dataset. 
VARS. 
The vector of the name of potential confounding variables in the dataset. 
Details
The treatment variable should only contain 2 levels of treatment, and one should be viewed as treated group and another is control group.
For stabilized weights:
For the treated individuals, we assign the IPW: w = Pr(T=1)/Pr(T=1X=x), for control individuals, the stabilized weight is: w = (1Pr(T=1))/(1Pr(T=1X=x)).
Value
doPS returns an object of class "PS". An object of class "PS" is a list containing the following components:
Data 
A new dataset which excludes all the missing value on the potential confounders from input data, add the propensity score and IPW into the new dataset.

ps 
an object of class 