I am currently using marginsplot to graph predicted margins from a multivariable logistic regression. I have a couple of issues;
1) First off, the confidence intervals extend in one of the x variables, beyond zero and 1. I would like them to "stop" at these limits in the graph.
2) I am using marginsplot with addplot to also present bar graphs for the sample size for each of the x variables. I can't seem to find a means to move the second y axis to the right. it "insists" on staying on the left.
marginsplot, title ("Composite") subtitle("NeuroSurgery") ytitle(Predicted Proportion) plotopts(connect(i)) ///
ylabel(0(0.1)1.1) yline(0.532) xlabel(1(1)31, labels angle(45) labsize(*0.6)) ///
addplot(bar MRPCount_comp NSmrp, fcolor(none) lcolor(red) lwidth(thin) yaxis(2) ///
legend(order(2 "Composite" 3 "Count")) ytitle(Survey Count, axis(2)) xlabel(1(1)9) xtitle(Surgeon))
thanks
1) First off, the confidence intervals extend in one of the x variables, beyond zero and 1. I would like them to "stop" at these limits in the graph.
2) I am using marginsplot with addplot to also present bar graphs for the sample size for each of the x variables. I can't seem to find a means to move the second y axis to the right. it "insists" on staying on the left.
marginsplot, title ("Composite") subtitle("NeuroSurgery") ytitle(Predicted Proportion) plotopts(connect(i)) ///
ylabel(0(0.1)1.1) yline(0.532) xlabel(1(1)31, labels angle(45) labsize(*0.6)) ///
addplot(bar MRPCount_comp NSmrp, fcolor(none) lcolor(red) lwidth(thin) yaxis(2) ///
legend(order(2 "Composite" 3 "Count")) ytitle(Survey Count, axis(2)) xlabel(1(1)9) xtitle(Surgeon))
thanks
Comment