However, when I use addplot to add in the observed data, I get an error: "Graph family bygraph_g does not support addplot. r(198);". Is there a way around this to achieve what I am trying to do?
Code:
. quietly mlogit gender_n c.year##i.position_department_n, rrr vce(cluster person) . quietly margins i.position_department_n, at(year=(1(1)7)) . . **WITHOUT ADD PLOT . . marginsplot, bydimension(position_department_n) legend(pos(3)) recast(line) plot1opts(lcolor(gs8)) ciopt(color(black%20)) recastci(rarea) ytitle("Propor > tion") plotd(,label( "F" "M" "U")) Variables that uniquely identify margins: year position_department_n _outcome Array . . **WITH ADDPLOT . . marginsplot, bydimension(position_department_n) legend(pos(3)) recast(line) plot1opts(lcolor(gs8)) ciopt(color(black%20)) recastci(rarea) ytitle("Propor > tion") plotd(,label( "F" "M" "U")) addplot((scatter prop year if gender_n==4, msymbol(circle) mcolor(black) msize(vsmall)) (scatter prop year if gender_ > n==5, msymbol(circle) mcolor(black) msize(vsmall)) (scatter prop year if gender_n==6, msymbol(circle) mcolor(black) msize(vsmall))) Variables that uniquely identify margins: year position_department_n _outcome Graph family bygraph_g does not support addplot. r(198);
0 Response to addplot error after marginsplot
Post a Comment