Hello,
I am using marginsplot to graph predicted probabilities but I need to switch my legend and xaxis. In other words, I would like the xaxis to be the values of Y (1 2 3) and the legend to contain my X values.
Y: hr_ma_groups: ordinal var ranging from 1-3
X: hr_ : group variable ranging 1-4; 1-control, 2-4 are independent experimental conditions.
ologit hr_ma_groups i.hr_, or
margins i.hr_
marginsplot, recast(bar)
This is what I am getting. I need to switch the xaxis and the legend. Is that possible?



Many thanks!
I am using marginsplot to graph predicted probabilities but I need to switch my legend and xaxis. In other words, I would like the xaxis to be the values of Y (1 2 3) and the legend to contain my X values.
Y: hr_ma_groups: ordinal var ranging from 1-3
X: hr_ : group variable ranging 1-4; 1-control, 2-4 are independent experimental conditions.
ologit hr_ma_groups i.hr_, or
margins i.hr_
marginsplot, recast(bar)
This is what I am getting. I need to switch the xaxis and the legend. Is that possible?
Many thanks!

Comment