Announcement

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

  • How do you peform a subgroup analyses using interaction symbol ## for an RCT where the predictor is the study arm and the outcome is binary?

    Hello,

    I would be very grateful for some help. I have a data set with a sample size of 260. It is from an RCT where the control is coded as 1 and the intervention arm is coded as 2. The primary outcome is binary. I need to peform subgroup analysis on a range of baseline collected info e.g. sex, ethnicity, age (this is a binary variable <40 or >40) etc.

    As the outcome is binary I am using logistic regression and the STATA command looks like this-

    Logistic outcomevariable i.studyarm##i.sex

    Is this correct? Does it make sense that the study arm is in the interaction in that way for a subgroup analyses? And how do I interpret the findings?


    Many thanks!

  • #2
    Yes that logistic command looks correct to see the study arm effect separately in each sex. (Well, logistic should begin with a lower case l, not L.)

    The simplest way to work with interaction models is to ignore the regression output and turn to -margins- after the regression:

    Code:
    margins studyarm#sex
    will give you the predicted probabilities of a positive outcome in each arm, disaggregated by sex. If you also want to look at the effect of the study intervention in each sex you can do:

    Code:
    margins sex, dydx(studyarm)
    which will give you the estimated difference in outcome probability between treatments and controls in each sex.

    If you want the effects in the odds-ratio metric rather than probability differences, then you go back to the logistic regression output itself. The odds ratio of study intervention among the reference category for sex will be given by the odds ratio in the 2.studyarm line of the table. That for the other sex will be the product of the odds ratio in the 2.studyarm line with that in the 2.studyarm#?.sex, where ? is the number that encodes the non-reference sex category.

    Comment


    • #3
      Hi Clyde,

      That's very helpful. Thank you so much for your speedy response!



      Comment


      • #4
        Just one more thing. How could I perform an interaction test with a categorical predictor such as ethnicty with 3 or more categories as opposed to a binary predictor like sex. Would I still be able to use the interaction term?

        Many thanks

        Comment


        • #5
          Yes. You may wish to try out and see it works appropriately. Also, I kindly suggest you take a look at the related examples from the Stata Manual.
          Best regards,

          Marcos

          Comment


          • #6
            Hi there,

            I'm sorry I'm a little confused. I did as above (but recoded study arm as 1 for control and 2 for intervention)

            and I got the following output-

            (adm1 means admission)
            (age2 is a binary outcome where 1 is less than 40 and 2 is greater than 40 years of age)

            -----------------------------------------------------------------------------
            adm1 | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
            --------------+----------------------------------------------------------------
            studyarm |
            Control | 5.440228 1.952061 4.72 0.000 2.692707 10.9912
            2.age2 | .9568627 .4068327 -0.10 0.917 .4158544 2.201699
            |
            studyarm#age2 |
            Control#2 | .9305677 .5275131 -0.13 0.899 .3063553 2.82664
            |
            _cons | .2786885 .0764323 -4.66 0.000 .1628062 .4770536
            -------------------------------------------------------------------------------


            Is 0.93 the odds ratio of anyone in the control arm who is male being admitted?

            Many thanks!

            Comment


            • #7
              This text may be helpful to you.

              In the forfhcoming messages, please try to provide command and output under CODE delimiters or by installing the SSC dataex, as recommend in the FAQ.

              Best regards,

              Marcos

              Comment

              Working...
              X