Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Re overlaying normal curves over multiple histograms
From
Jennifer Dent <[email protected]>
To
[email protected]
Subject
st: Re overlaying normal curves over multiple histograms
Date
Mon, 13 Aug 2012 17:37:38 +0100
Hello,
I am trying to overlay two histograms, both with normal distributions
added. I am able to add a normal line to the first histogram, and to add
a second histogram using addplot, but I am not able to add a second
normal line. Is there a way to do this? I want the y-axis presented as
percentage (or frequency) and not density and wonder if this is where my
problem might be?
My code, along with the error, is given below:
clear
set obs 10000
gen WE = rnormal(123.5, 17)
sort WE
gen SA = rnormal(127.9, 17)
sort SA
histogram WE, percent normal addplot(histogram SA, percent normal)
error: option normal not allowed r(198)
Many thanks in advance,
Jennifer Dent
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/