--- Ana Gabriela Guerrero Serdan <[email protected]> wrote:
> I'm doing a histogram of z-scores. My distribution is
> skewed to the left median is on -1. I would like to
> show the histogram and a normal distribution but the
> normal distribution going from the mean value 0 not
> from the median -1.
>
> How can move the normal distribution?
1) You don't have to move the normal distribution, it
is already centered around the mean:
*---------- begin example ---------
drop _all
set obs 1000
gen x = exp(invnormal(uniform()))
sum x
replace x = (x-r(mean))/r(sd)
hist x, norm
*----------- end example -----------
2) Comparing the hight of the histrogram bars to a
curve is a bad way of finding patterns in the
deviations from the Gaussian distribution.
Alternatives are Nick Cox's -dpplot- and mine
-hangroot-. See: -ssc desc dpplot- and
-ssc desc hangroot-.
Hope this helps,
Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
__________________________________________________________
Sent from Yahoo! Mail.
The World's Favourite Email http://uk.docs.yahoo.com/nowyoucan.html
*
* 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/