Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: plotting multiple normal densities


From   Nick Winter <nw53@cornell.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: plotting multiple normal densities
Date   Tue, 31 Aug 2004 08:32:14 -0400

If you know the mean and standard deviation of each normal curve you want, you can just use -twoway function-. For example, to do two curves, with means 0 and 1, and standard deviations 1 and 3:

. graph twoway function normden(x, 0, 1) , range(-5 5) || ///
function normden(x, 1, 3) , range(-5 5)

--Nick Winter

At 12:59 PM 8/31/2004 +0100, you wrote:

I have a (mixed logit) model in which the mean and variance of
several variables' distributions are estimated. In all cases (so far)
these are normally distributed.

I want to plot these pdf's, so I use 'drawnorm' to draw from a
sample with the required mean and variance.

I can then plot these individually using the 'normal' option after
'hist', or using 'kdensity'.

However I want to plot >1 of these distributions on the same graph
to allow visual comparison.
Ideally it would not be a histogram, just the pdf plots.

Can anyone advise how this is done?

thanks,
dan rigby





Dr Dan Rigby
Environmental Economist
School of Economic Studies
Manchester University
M13 9PL
0161 275 4808
http://les1.man.ac.uk/ses/
*
*   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/
--------------------------------------------------------
Nicholas Winter 607.255.8819 t
Assistant Professor 607.255.4530 f
Department of Government nw53@cornell.edu e
308 White Hall falcon.arts.cornell.edu/nw53 w
Cornell University
Ithaca, NY 14853-4601

*
* 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/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index