Marteen,
Sorry, my mean (not median) is -1 so I want a
hypothetical normal distribution to be centered around
0 not -1. The reason is that I would like to compare
the distribution of my sample to a hypothetical
distribution. So I want to plot both distributions in
the histogram.
I will look at the dplot and hangroot.
thanks,
--- Maarten buis <[email protected]> wrote:
> --- 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/
>
Gaby Guerrero Serdan
Deparment of Economics
Royal Holloway, University of London
TW20 OEX
Egham, Surrey
England, UK
http://www.rhul.ac.uk/economics/About-Us/postgrads.html
http://ag.guerreroserdan.googlepages.com/gabyguerrero%27swebpage
http://www.flickr.com/photos/49939890@N00/show/
Tel: +44 7912657259
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
*
* 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/