Hi there,
I've been struggling with getting my marginsplot the way I would like it. I will use the example data fullauto show my problem.
I have a DV rep77 with 5 categories, ranging from 1 (poor) to 5 (excellent). I have 2 EV, namely mpg (continuous) and the dummy variable foreign.
I have the following ordered logit model
When I follow up with the commands below, I get 10 curves, because of the 5 categories of the DV and 2 categories of the EV foreign
I would like it if only the curves of the probabilities of outcome 1 and outcome 2 would show (for both foreign and domestic, so 4 curves in total). How do I do this?
In addition, I would like to have this graph with 2 curves: the predicted probabilities of outcome < 3 (so either 1 or 2), for both foreign and domestic.
Is this possible to obtain with a marginsplot?
I learned that after estimating the model, you could do the following to obtain the predicted probability for y < 3.
Then with -scatter-, you can get the graph. Is there another way?
I hope everything is clear. Thank you in advance
Complete do file down below
I've been struggling with getting my marginsplot the way I would like it. I will use the example data fullauto show my problem.
Code:
clear all webuse fullauto
I have the following ordered logit model
Code:
ologit rep77 mpg i.foreign
Code:
margins, at(mpg=(10(5)45) foreign=(0(1)1)) marginsplot
In addition, I would like to have this graph with 2 curves: the predicted probabilities of outcome < 3 (so either 1 or 2), for both foreign and domestic.
Is this possible to obtain with a marginsplot?
I learned that after estimating the model, you could do the following to obtain the predicted probability for y < 3.
Code:
predict p1-p5 generate p12 = p1 + p2
I hope everything is clear. Thank you in advance

Complete do file down below
Code:
clear all webuse fullauto ologit rep77 mpg i.foreign margins, at(mpg=(10(5)45) foreign=(0(1)1)) marginsplot * The 2 graphs I would like to obtain with marginsplot ologit rep77 mpg i.foreign predict p1-p5 scatter p1 p2 mpg generate p12 = p1 + p2 scatter p12 mpg
Comment