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: Graphics - normal density line
From
Joerg Luedicke <[email protected]>
To
[email protected]
Subject
Re: st: Graphics - normal density line
Date
Wed, 5 Mar 2014 00:32:11 -0500
See -help twoway_function-, here is an example.
* ---------------------------------------
clear
set obs 100
gen x1 = rnormal(0,1)
gen x2 = rnormal(0.5,1.3)
sum x1
local M1 = r(mean)
local SD1 = r(sd)
sum x2
local M2 = r(mean)
local SD2 = r(sd)
tw function x1 = normalden(x, `M1', `SD1') , range(-4 4) || ///
function x2 = normalden(x, `M2', `SD2'), range(-4 5)
* ---------------------------------------
Joerg
On Tue, Mar 4, 2014 at 8:04 PM, Antonio F. Boing <[email protected]> wrote:
> Hello Statasticians,
>
> I have two variables in my dataset and I want to plot the normal density lines overlayed without the histograms (both lines in the same graphic). How can I do that? I hope you can help me...
>
> thanks, Antonio
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/