Hello, I would like to combine the below two graphs into one. The first one shows observed data, and the second one shows predicted probabilities from a model. Below is the code and the two graphs. Is this possible, if so, how should the code be adjusted? thanks!
Graph 1:
Graph 2:
Code:
****Graph 1 graph twoway (scatter prop year if gender_n==4, msymbol(Oh)) (scatter prop year if gender_n==5, msymbol(S)) (scatter prop year if gender_n==6, msymbol(S)), legend(label(5 M) label(4 F) label(6 U)) ****Graph 2 quietly mlogit gender_n year, rrr vce(cluster person) quietly margins, at(year = (2007(1)2013)) post marginsplot, recast(line) plot1opts(lcolor(gs8)) ciopt(color(black%20)) recastci(rarea) title("Marketing") xtitle("year") ytitle("Predicted Probability") xlabel(2007 "2007" 2008 "2008" 2009 "2009" 2010 "2010" 2011 "2011" 2012 "2012" 2013 "2013") plotd(,label( "F" "M" "U"))
Graph 2:
Comment