0
$\begingroup$

Let's assume that I have two groups that I would like to compare in terms of death rates. One group (group A) got a specific treatment and the other group (group B) did not get any treatment. I matched the groups using full propensity score matching because the groups differed systematically from one another. Now I would like to perform a log-rank test in the basis of the matched groups and I cannot find how to do that in SPSS or R. I matched the groups with R and am left with the propensity score, weights and subclasses. Now I would like to compare the mean time until death. Who can help?

$\endgroup$

1 Answer 1

0
$\begingroup$

Instead of using matching, you can calculate inverse probability of treatment weights from your estimated propensity scores. These weights can then be used to perform a weighted log-rank test, as described in this article:

Xie, Jun and Chaofeng Liu (2005). “Adjusted Kaplan-Meier Estimator and Log-Rank Test with Inverse Probability of Treatment Weighting for Survival Data”. In: Statistics in Medicine 24, pp. 3089–3110.

This is implemented in the ipw.log.rank function in the RISCA R-package. Adjusted survival curves can be plotted in a similar fashion using the ipw.survial function of that same package. Note that the latter function is rather limited in terms of customizability (does not support confidence interval calculation etc.). You can find a more flexible implementation in the adjustedCurves R-package I developed.

$\endgroup$
6
  • $\begingroup$ Thank you so much for your help. So I will calculate the inverse probability (1/PSM-score) and then following up on the log-rank test. This is brilliant. However, I am wondering whether I use the weights or subclasses that I have gotten from PSM in the first place at all? $\endgroup$
    – user389026
    Jun 2, 2023 at 20:25
  • $\begingroup$ Be careful, IP weights are not just 1/PS. It's 1 divided by the probability of receiving the treatment that they did get, in R code: ifelse(treatment=="experimental", 1/ps, 1/(1-ps)). (If you want to be safe, use the get_w_from_ps function from the WeightIt package to calculate the IP weights.) I don't see the need for PSM here. The weighted log rank test does all you need. $\endgroup$
    – Denzo
    Jun 2, 2023 at 20:43
  • $\begingroup$ True! Ok so, no PSM at all as you said I could calculate the IPTW from the propensity scores. But I will just do a log regression, thereby get the probabilities for each person and so on. No PSM. Thanks again $\endgroup$
    – user389026
    Jun 2, 2023 at 20:54
  • $\begingroup$ That worked out great. I now have the plotted KM curves and am wondering how I can get the (restricted) mean as well as the median. There is no way to do that in the RISCA R-package, is there? $\endgroup$
    – user389026
    Jun 3, 2023 at 13:24
  • $\begingroup$ I have also tried using the adjsurv function of the adjustedCurves package but I am stuck on this error message: Arguments 'variable', 'ev_time', 'event' and 'method' must be character strings, specifying variables in 'data'. $\endgroup$
    – user389026
    Jun 4, 2023 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.