Hello, I am currently trying to make a graph using marginsplot after the mimgrns command. I am having trouble getting marginsplot to use the exponentiated predictions on the y-axis. My code is as follows:
I've attached a PDF of the graph I get. It looks good, except that I want the y-axis to be predicted probabilities, and right now I think these are on the log scale. I tried adding the eform option to mimrgns but marginsplot afterward still plots the un-exponentiated values. Is there anyway around this, either with another command, or some way of exporting these values to a separate dataset to plot independently of marginsplot? Thank you in advance for any help that can be offered.
(Also, I have read the online help file for mimrgns and understand that the CIs plotted with marginsplot are not correct.)
Code:
mi estimate, eform: /// logit ALC_ c.MED_ c.ADHD_ c.DEP_ AGE i.WAVE i.SEX i.ETHNIC i.FAMHIST_ALC i.FAMHIST_DRUG i.WAVE i.LUNCH, or vce(cluster SCHOOL) mimrgns, at(MED_=(0(1)42)) atmeans eform cmdmargins marginsplot, /// recast(line) /// recastci(rarea) /// ciopts(fintensity(30) /// lwidth(none)) /// yla(-4(1)4, ang(h)) /// xtitle("Social Media Score", size(small)) /// ytitle("Probability of Initiating Alcohol Use", size(small)) /// title("Probability of Initiating Alcohol Use, by Social Media Score") /// subtitle("Overall Sample") /// saving(GRAPH_overall, replace) graph export GRAPH_overall.pdf, replace
(Also, I have read the online help file for mimrgns and understand that the CIs plotted with marginsplot are not correct.)
Comment