Announcement

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

  • Calculating Propensity score + Inverse probability of treatment weighting (IPTW) for multiple exposures

    I have 5 different drugs (exposures) which individuals have been prescribed and I want to first calculate their propensity score and then use this score to calculate stabilized IPTW. Previously where my exposure variable is binary I would use -logistic- followed by -predict propensity- to calculate the propensity scores and then use either teffects ipw or manual calculate stabilised ipw.

    However, I am unclear how to do this where my exposure has 5 different categories. A sample is given below if anyone is kind enough to share with me the correct syntax.

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input byte(exposure sex age HTN depression renal)
    2 0 73 1 0 1
    2 1 61 1 0 1
    2 0 90 1 0 1
    0 1 72 1 0 1
    0 0 50 1 0 1
    0 1 54 1 0 1
    1 0 62 1 0 1
    2 1 68 1 0 1
    3 0 67 0 1 1
    0 1 58 1 0 1
    2 1 73 1 0 1
    1 1 67 1 0 1
    0 1 47 1 0 1
    1 0 65 1 0 1
    1 1 77 1 0 1
    1 0 69 1 0 1
    0 0 72 1 0 1
    0 0 58 1 0 1
    0 0 47 1 0 1
    1 0 74 1 0 0
    0 0 70 1 0 0
    2 1 75 1 0 1
    3 1 83 0 1 1
    0 1 46 1 0 0
    3 0 46 0 1 1
    1 1 65 1 0 0
    2 0 42 1 0 1
    1 0 61 1 0 1
    2 1 52 1 0 0
    3 1 60 0 1 1
    2 0 75 1 0 1
    0 1 67 1 0 0
    0 0 57 1 0 0
    4 1 63 0 1 0
    3 1 62 0 1 1
    3 0 56 0 1 1
    3 0 68 0 1 1
    1 1 56 1 0 0
    3 0 54 0 1 1
    0 1 56 1 0 0
    3 0 62 0 1 1
    1 0 61 1 0 0
    2 0 75 1 0 0
    1 0 47 1 0 1
    0 1 53 1 0 0
    1 0 67 1 0 1
    4 0 72 0 1 0
    2 0 69 1 0 0
    1 0 77 1 0 1
    2 1 68 1 0 0
    4 0 58 0 1 1
    4 0 62 0 1 0
    4 0 54 0 1 1
    4 0 63 0 1 0
    4 0 53 0 1 0
    end
    label values exposure exposure
    label def exposure 0 "drug A", modify
    label def exposure 1 "drug B", modify
    label def exposure 2 "drug C", modify
    label def exposure 3 "drug D", modify
    label def exposure 4 "drug E", modify

    Thank you
Working...
X