1
$\begingroup$

I have clinical data and used optimal matching in the MatchIt package to match cases to controls on several variables. Matching was done in a 1:1 ratio, and balance was achieved.

I then did a Kaplan-Meier analysis with a log rank test in the R survival package. A reviewer has said I need "the log rank test should be stratified by pairs."

I'm unclear why this is necessary - the only weights I'm seeing from the matching procedure are 0's and 1's.

Is there a way to "stratify by pairs" in R?

Any guidance to references is appreciated!

$\endgroup$

1 Answer 1

1
$\begingroup$

Optimal matching returns pair membership in the subclass column of the match.data() output. This can be added to the log-rank test as a stratum variable using the following model formula:

Surv(time, status) ~ treat + strata(subclass)

This is recommended to account for the paired nature of the matched sample and has nothing to do with the weights.

$\endgroup$
1
  • $\begingroup$ Thanks so much, Noah! $\endgroup$
    – John Ryan
    Commented Jul 11, 2023 at 17:01

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.