Announcement

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

  • How do I generate a risk score and then use it to calculate quartile odds ratio

    Hello

    I was looking for some assistance in generating a prediction risk score for a binary outcome (cr_code), then using the risk score to calculate the quartile odds ratio for patients in the highest risk quartile compared to the lowest risk quartile for having the event.

    Variables I would like to include in the risk score are ones that were significant in a logistic regression backwards selection analysis: age, race, gender, income, education cognitive function. This is what I have so far you:

    logit cr_code i.income i.education i.q_cognitive2
    predict yhat, xb

    Your assistance will be greatly appreciated.

  • #2
    first, when you use the -predict- command, use the "pr" option not the "xb" option; see
    Code:
    help logit postestimation##predict
    there are a number of ways you can divide the resulting risk score into quartiles if that's what you really want; see, e.g.,
    Code:
    help pctile

    Comment

    Working...
    X