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=1|X=x), for control individuals, the stabilized weight is: w = (1-Pr(T=1))/(1-Pr(T=1|X=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_ate

The estimated propensity scores with estimand of interest as ATE

ipw_ate_unstab

Unstabilized ipw calculated from ps_ate

ipw_ate_stab

Stabilized ipw calculated from ps_ate

ps

an object of class ps, See the help for ps for details of the ps class.

See Also

ps


[Package cmprskcoxmsm version 0.2.0 Index]