Bookmark and Share

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]

Re: st: plot a normal distribution using stata


From   John Antonakis <[email protected]>
To   [email protected]
Subject   Re: st: plot a normal distribution using stata
Date   Tue, 15 May 2012 13:18:13 +0200

Try something like this:


Something like this?

/* Plot two normal distributions */
#delimit ;
graph twoway (function y=normalden(x,1,2), range(-10 20) lw(medthick))
             (function y=normalden(x,5,3), range(-10 20) lw(medthick)),
  title("Normal-Distribution comparison")
  xtitle("Normal", size(medlarge)) ytitle("")
  xlabel(-10(2)20)
  xscale(lw(medthick)) yscale(lw(medthick))
  legend(off)
  graphregion(fcolor(white));
#delimit cr
/* Stata code ends */

HTH,
J.

__________________________________________

Prof. John Antonakis
Faculty of Business and Economics
Department of Organizational Behavior
University of Lausanne
Internef #618
CH-1015 Lausanne-Dorigny
Switzerland
Tel ++41 (0)21 692-3438
Fax ++41 (0)21 692-3305
http://www.hec.unil.ch/people/jantonakis

Associate Editor
The Leadership Quarterly
__________________________________________


On 15.05.2012 10:57, Jian Zhang wrote:
Hi Statalisters,

I wanted to quickly plot two normal distributions with different means
and stds using stata in one graph. How could I do that? thanks!

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index