Announcement

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

  • Relative risk and the risk difference

    Hi, I try to estimate the treatment effect in an RCT using the xtlogit command as I have panel data.The primary outcomes are binary.
    It is easy to report odds ratios, but I am struggling with the calculation of relative risk and the risk difference. Do you have any idea?

  • #2
    Code:
    help meglm
    note that family(binomial) is your starting place; use link(log) for relative risk and link(identity) for risk difference

    Comment


    • #3
      Or, if you stuck with xtlogit, the margins post-estimation command will give you risk differences. From there, you could use nlcom to calculate risk ratios, but by the time you're trying to figure out the nlcom syntax you might as well switch to meglm.
      Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

      When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

      Comment


      • #4
        My $0.02, I would use the modified Poisson regression approach (Poisson regression, aka GLM with log link and Poisson family, wiht robust variance estimator). The exponentiated coefficients are directly the risk ratios, and margins will let you estimate risk differences. This is easier than using nlcom to reverse-engineer the RR from the OR. If you need repeated measures, xtgee will do the trick.

        Comment

        Working...
        X