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
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 ?
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
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 ?

Comment