I have code a variable - categorical, which is called -severity- (excellent (1) - fair (2) - poor (3)) for a treatment variable (treatment = 1, treatment = 0 control)
I am trying to plot onto a graphs to predict the probability of the person having excellent or fair or poor outcomes for treatment variables.
However, I can't plot a line graph as the dependent variable is categorical, do you have any ideas how to plot the marginsplot graphs into 1 graph?
I am trying to plot onto a graphs to predict the probability of the person having excellent or fair or poor outcomes for treatment variables.
However, I can't plot a line graph as the dependent variable is categorical, do you have any ideas how to plot the marginsplot graphs into 1 graph?
Code:
ologit severity treatment age gender [pw=weight] margins, at(treatment=(0/1)) predict(outcome(1)) atmeans ///excellent marginsplot margins, at(treatment=(0/1)) predict(outcome(2)) atmeans ///fair marginsplot margins, at(treatment=(0/1)) predict(outcome(3)) atmeans ///poor marginsplot ologit everity treatment age gender [pw=weight] predict probexcellent probfair probpoor twoway (line probexcellent treatment, lcolour(dkgreen) lpattern(solid)) (line probfair treatment, lcolour(dknavy) lpattern(solid))
Comment