I'm trying to draw histograms of IQ by sex overlaid by normal curves with mean 100 and sd 15.
This works beautifully:
graph twoway (histogram iq, by(, legend(off)) by(sex, cols(1)) xtit(IQ) ytit(Density) xlab(20(20)180) legend(off)) (function normalden(x,100,15), range(20 180) xsize(3.5) ysize(4.5))
Except the y-axis is density and I want percent.
I can get percent with this:
histogram iq, percent normal by(, legend(off)) by(sex, cols(1)) xtit(IQ) xlab(20(20)180) xsize(3.5) ysize(4.5)
But, I can't specify the mean and sd of the normal--they are drawn from the data.
Is there a way to draw percent histograms overlaid by normal curves with my specified mean 100 and sd 15?
This works beautifully:
graph twoway (histogram iq, by(, legend(off)) by(sex, cols(1)) xtit(IQ) ytit(Density) xlab(20(20)180) legend(off)) (function normalden(x,100,15), range(20 180) xsize(3.5) ysize(4.5))
Except the y-axis is density and I want percent.
I can get percent with this:
histogram iq, percent normal by(, legend(off)) by(sex, cols(1)) xtit(IQ) xlab(20(20)180) xsize(3.5) ysize(4.5)
But, I can't specify the mean and sd of the normal--they are drawn from the data.
Is there a way to draw percent histograms overlaid by normal curves with my specified mean 100 and sd 15?
Comment