Hello,
I'm working on a marginsplot graph, but I'm unable to set the label as I would like.
Consider the following example:
The above marginsplot results in the following image (Figure 1).

Now, I would like this graph in grays, which means that the label can't be two lines using different colors.
Thus, I've attempted the following (Figure 2):
Resulting in:

Which would be what I intend, but the confidence intervals are missing, thus, a 3rd attempt (Figure 3):

Which doesn't work, because the confidence intervals are colored and the label below the X axis represents the confidence intervals instead of the marginal effects. My intended result would be for the confidence intervals to be used dashed lines like the marginal effects, or simply solid black lines, and the label of the graph to be as in Figure 2.
I hope this wasn't confusing.
Thanks very much for your time!
Hélder Costa
I'm working on a marginsplot graph, but I'm unable to set the label as I would like.
Consider the following example:
Code:
clear all webuse nhanes2d probit highbp height weight age female margins,dydx(weight) at(weight=(53.52(10)91.63) female=(0 1)) marginsplot, scheme(s2color) graphregion(color(white)) /// legend(region(color(white))) legend(order(1 "Males" 2 "Females")) /// xtitle("Weight") title("")
Now, I would like this graph in grays, which means that the label can't be two lines using different colors.
Thus, I've attempted the following (Figure 2):
Code:
marginsplot, scheme(s2color) recast(line) noci plot1opts(lcolor(black) lpattern(shortdash)) plot2opts(lcolor(black) lpattern(longdash)) /// legend(region(color(white))) legend(order(1 "Males" 2 "Females")) /// xtitle("Weight") title("")
Which would be what I intend, but the confidence intervals are missing, thus, a 3rd attempt (Figure 3):
Code:
marginsplot, scheme(s2color) recast(line) plot1opts(lcolor(black) lpattern(shortdash)) plot2opts(lcolor(black) lpattern(longdash)) /// legend(region(color(white))) legend(order(1 "Males" 2 "Females")) /// xtitle("Weight") title("")
Which doesn't work, because the confidence intervals are colored and the label below the X axis represents the confidence intervals instead of the marginal effects. My intended result would be for the confidence intervals to be used dashed lines like the marginal effects, or simply solid black lines, and the label of the graph to be as in Figure 2.
I hope this wasn't confusing.
Thanks very much for your time!
Hélder Costa
Comment