data("psdata")
data("psdata_bin_prospective_fp")
data("psdata_bin_retrospective_fp")
# the propensity model
ps.formula <- trt~cov1+cov2+cov3+cov4+cov5+cov6
survey.weight <- psdata_bin_retrospective_fp$survey_weight
psfit <- PSmethod_SW(ps.formula = ps.formula,
data = psdata_bin_retrospective_fp,
survey.weight = survey.weight, ncate=2)
Run the code above in your browser using DataLab