I am exploring various methods of covariate adjustment to estimate treatment effects. These include - matching, weighting (IPTW) and use of propensity scores as a continuous variable in the cox model.
Here is a fully reproducible R script
library("survival")
library("survminer")
library("MatchIt")
data("ovarian")
head(ovarian)
summary(as.factor(ovarian$rx))
ovarian$rx <- ifelse(ovarian$rx==1, 1, 0)
ps <- matchit(rx ~ age + resid.ds + ecog.ps, data = ovarian, method="nearest")
propensity_scores <- ps$distance
ovarian$ps <- propensity_scores
cox_model <- coxph(Surv(futime, fustat) ~ rx + ps, data = ovarian)
summary(cox_model)
Call:
coxph(formula = Surv(futime, fustat) ~ rx + ps, data = ovarian)
n= 26, number of events= 12
coef exp(coef) se(coef) z Pr(>|z|)
rx 0.6105 1.8414 0.5908 1.033 0.301
ps -1.1348 0.3215 5.3374 -0.213 0.832
exp(coef) exp(-coef) lower .95 upper .95
rx 1.8414 0.5431 0.578463044 5.862
ps 0.3215 3.1104 0.000009204 11230.137
Concordance= 0.624 (se = 0.082 )
Likelihood ratio test= 1.1 on 2 df, p=0.6
Wald test = 1.08 on 2 df, p=0.6
Score (logrank) test = 1.11 on 2 df, p=0.6
As you can see, I have used the propensity scores from the logistic regression model as a continuous variable to estimate treatment effect. I did this without matching or weighting.
This means that the Cox regression model has been adjusted with the propensity of being assigned to treatment for each patient. This way, I do not intend to include all the covariates in the Cox model. Instead I just used the propensity score as a continuous variable in the model.
Questions:
- Can we compare the hazard ratios from such a Cox model with those of Cox models who are generated by using only the matched patients (propensity score matching like 1:1 nearest neighbor matching) and Cox models weighted by IPTW weights.
- How do I generate adjusted Cox survival curves for the two treatment groups from the Cox model?