Announcement

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

  • Store the odds values from tabodds to plot them

    Hi,
    I have 2 variables:
    - the outcome is a dichotomous variable where the patient has or does not have the disease
    - the predictor is the age presented as a discrete/categorical one, in this case is a categorical one

    I use
    Code:
    tabodds outcome predictor
    and I get the odds for each age class.

    I would like to plot each odd (not really the odds, the log of the odds) against the age in a scatter plot.
    I saw there is a scalar named r(odds) but I'm not sure if It fits my needs.

    What is the best way to calculate the log of the odds for each age class, and plot them with the age in a scatter plot ?
    Last edited by Valentino Santori; 26 Oct 2022, 14:04.

  • #2
    update: I've found that option
    Code:
    graph
    in this way
    Code:
    tabodds outcome predictor, graph
    as stated in the manual, plots the odds against categories, but I still need the log transformation.

    Comment

    Working...
    X