Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can we conduct an IPTW-based win ratio test in Stata?

    The mathematical theory is based on this paper https://doi.org/10.1080/10543406.2023.2275759 by Wang et al. (2025).

    The statistic behind the method is U-statistic, variance/covariance computation laws, and Hoeffding Decomposition rule. I am not sure if Stata has the syntax to do so and looking forward to your reply. Thank you.

    Tom

  • #2
    Can it be done? Yes, though I am not sure if there exist any commands yet that can do this. I tend to work on the win probability which is a related, but different, statistic. You can look at my command -winprob- to see if you can adapt it for your needs.

    Comment


    • #3
      Apparently the authors have conducted a simulation study so at least they have code available. Even if not in Stata, this might still help you. I suggest contacting them.
      Best wishes

      Stata 18.0 MP | ORCID | Google Scholar

      Comment


      • #4
        Thank a bunch, pals. I will contact the authors.

        Regards,

        Tom

        Comment


        • #5
          I think I figured it out how to do the IPTW-based win ratio analysis in Stata.

          First, we need to get the weight score for each observation. Then we expand the dataset based on the weight score for each observation. Finally, we do the unmatched win score analysis by the Stata package of -winratiotest- and because the new dataset is the pseudo-cohort, we treat each row in the pseudo-cohort dataset as independent.

          Regards,

          Tom

          Comment


          • #6
            Then we expand the dataset based on the weight score for each observation
            This is incorrect as it affect the estimation of variance. To make the weight score as precise as possible, we had to multiple the weight score by 100 (because Stata could not handle the weight/fraction as R or SAS) and then expand the dataset, which seriously affect the estimation of the variance (incorrectly small).

            Comment

            Working...
            X