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

st: RE: Overlaid Curves


From   [email protected]
To   [email protected]
Subject   st: RE: Overlaid Curves
Date   Mon, 22 Mar 2004 17:57:26 -0500



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/



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