I am running margins after a logistic regression to generate predicted probabilities for the interaction of two independent categorical variables.
Now I'd like to use -marginsplot, recast(bar) horizontal- to create a plot of these probabilities.
If I was doing this for a summary statistic, I could use -graph hbar- with multiple -, over()- options to get the categories nicely grouped on the y-axis:
Yields:

Is there a way to replicate this layout using -marginsplot-? The closest I can get is:
…which gives me 95% of the plot I want, but has repetitive labels and doesn't add spacing between the 'race' groups:

I have also tried:

…but obviously having the bars overplotted on one another like this is not terribly useful.
Thanks in advance!
Code:
webuse nhanes2 quietly logit highbp ib1.race ib8.sizplace margins sizplace#race
If I was doing this for a summary statistic, I could use -graph hbar- with multiple -, over()- options to get the categories nicely grouped on the y-axis:
Code:
graph hbar (mean) bpsystol, over(sizplace) over(race)
Is there a way to replicate this layout using -marginsplot-? The closest I can get is:
Code:
marginsplot, recast(bar) horizontal xdimension(race sizplace) yscale(reverse)
I have also tried:
Code:
marginsplot, recast(bar) horizontal xdimension(race) plotdimension(sizeplace) yscale(reverse)
…but obviously having the bars overplotted on one another like this is not terribly useful.
Thanks in advance!
Comment