Joseph McCrary <[email protected]> asks about the normal density that is
plotted by the -histogram- command:
> end-of-course grades. In the elementary grades, a student could receive one
> of 4 marks. When I add the normal curve to the plot, it begins with the
> midpoint of the first category but ends at the end of the last category. Is
> there a way I can either begin the normal curve at the beginning of the
> first category or end the normal curve at the midpoint of the last category?
> Here�s the code I�m using to generate the graph (STATA 8.2 SE on Windows
> XP):
>
> histogram elemlartnum if (gr_jun03_sasi=="01" & elemlartnum>=0 &
> elemlartnum<=3),
> discrete frequency normal gap(5)
> bcolor(ltbluishgray)
> blcolor(black) blwidth(vvvthin)
> ylabel(, labels angle(horizontal))
> xlabel(0 "Unsatisfactory" 1 "Satisfactory" 2 "Good" 3 "Excellent")
> xtitle(First Graders' End-of-Year Language Arts Course Grades)
> xscale(titlegap(4))
> name(G1lartgrades, replace) scheme(s2manual);
> graph export d:\g1lartgrades.emf;
To which Nick Cox <[email protected]> replied:
> As indicated in the on-line help, you need
> to specify changes to the rendition of the normal
> density through -normopts-.
> Try your code plus e.g.
> normopts(ra(-0.5 3.5))
> The on-line help is misleading insofar as it implies
> that only the connected line options are pertinent
> here.
Nick makes a good point regarding the on-line help; we will look into
improving the documentation.
As for the original question, it seems more reasonable that the density cover
the range of bars in the histogram. An update to -histogram- will be
available in a future ado-update.
--Jeff
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/