I don't believe -twoway function- has an -at()- option. Perhaps it should
be -range(myvar)- instead:
twoway histogram mpg || function f = normden(x,25,5) , range(mpg)
Scott
----- Original Message -----
From: <[email protected]>
To: <[email protected]>
Sent: Monday, March 22, 2004 4:57 PM
Subject: st: RE: Overlaid Curves
>
>
>
> Statalisters --
>
> I did try to use the function command to try to overlay a normal curve
> with a given mean and standard deviation on a histogram but received the
> error message "option at() not allowed". I tried to emulate Nick's
> syntax -twoway histogram myvar || function f = normden(x,<mean>,<sd>),
> at(myvar)- substituting "mpg" for "myvar" and "25" and "5" for <mean>
> and <sd>, respectively. Here is the output from my Stata:
>
> webuse auto
> (1978 Automobile Data)
>
> . about
>
> Intercooled Stata 8.2 for Windows
> Born 30 Jan 2004
> Copyright (C) 1985-2003
>
>
> . twoway histogram mpg || function f = normden(x,25,5), at(mpg)
> option at() not allowed
> invalid syntax
> r(198);
>
> I am sure I am doing something silly, but can't see what it is. Can
> anyone help?
>
>
>
>
>
> David Miller
> Office of Pesticide Programs
> U.S. Environmental Protection Agency
> 703-305-5352 (voice)
> 703 605-1289 (fax)
> OPP/Health Effects Division
>
*
* 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/