Hello I have a categorical variable <paprosky> and another binary categorical variable <revised>
I would like to show that the higher the value in <paprosky> the more likely it is going to be revised
I have managed to plot this as seen below however I ideally I would have wanted something of the sort. I have previously plotted somethings similar however it was only possible as the independent variable ie paprosky was continuous and this time as they are both categorical I am not able to plot the straight lines


I would like to show that the higher the value in <paprosky> the more likely it is going to be revised
I have managed to plot this as seen below however I ideally I would have wanted something of the sort. I have previously plotted somethings similar however it was only possible as the independent variable ie paprosky was continuous and this time as they are both categorical I am not able to plot the straight lines
Code:
///Current code for bar charts:
ologit paprosky revised age, or
///2a
margins, at(revised=(0/1)) predict(outcome(1)) atmeans
marginsplot, ytitle ("Probability = Revision risk Paprosky 2A") plot(revised) recast(bar) allxlabels by(revised) name(m1, replace)
//2b
margins, at(revised=(0/1)) predict(outcome(2)) atmeans
marginsplot, ytitle ("Probability = Revision risk Paprosky 2B") plot(revised) recast(bar) allxlabels by(revised) name(m2, replace)
//2c
margins, at(revised=(0/1)) predict(outcome(3)) atmeans
marginsplot, ytitle ("Probability = Revision risk Paprosky 2C") plot(revised) recast(bar) allxlabels by(revised) name(m3, replace)
//3a
margins, at(revised=(0/1)) predict(outcome(4)) atmeans
marginsplot, ytitle ("Probability = Revision risk Paprosky 3A") plot(revised) recast(bar) allxlabels by(revised) name(m4, replace)
//3b
margins, at(revised=(0/1)) predict(outcome(5)) atmeans
marginsplot, ytitle ("Probability = Revision risk Paprosky 3B") plot(revised) recast(bar) allxlabels by(revised) name(m5, replace)
graph combine m1 m2 m3 m4 m5, note("Probability of revision on Paprosky severity")ycommon name(g2, replace)
