Learn R Programming

CBPS (version 0.8)

IPW: Inverse Probability Weighting Estimators

Description

IPW calculates the inverse probability weighting estimators from Lunceford and Davidian (2004).

Usage

IPW(outcome, treat, data, pscore, k)

Arguments

outcome
A vector of the outcome variable.
treat
A vector of treatment assignments, where 1 indicates assignment to the treatment group and 0 indicates assignment to the control group.
data
an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from
pscore
A vector of propensity scores.
k
The number of covariates considered in the generation of the propensity scores.

Value

  • Returns a data frame whose columns are the point estimates and standard errors for these inverse probability weighting estimators, and whose rows correspond to IPW1, IPW2, and IPW3. Use only with binary treatments.

Details

Calculates the inverse probability weighting estimators from Lunceford and Davidian (2004). For use with CBPS, run only with ATE. Note that the IPW weights from Hirano et. al (2003) can be obtained by setting standardize = TRUE in CBPS.

References

Lunceford, Jared and Marie Davidian. ``Stratification and Weighting Via the Propensity Score in Estimation of Causal Treatment Effects: A Comparative Study.'' Statistics in Medicine 23, 15 October 2004.

See Also

DR

Examples

Run this code
###
### Example: propensity score matching
###

##Load the LaLonde data
data(LaLonde)
## Estimate CBPS via logistic regression for ATE (Run with ATE only)
fit <- CBPS(treat ~ age + educ + re75 + re74 + I(re75==0) + I(re74==0), 
			data = LaLonde, ATT = FALSE)
##Calculate the IPW estimators
inverse.prob.wt <- IPW(outcome = re78, treat = treat, data = LaLonde, 
					   pscore = fitted(fit), k = length(coef(fit)))

Run the code above in your browser using DataLab