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

Re: st: -kdensity, normal normopts(lpattern(dash))- ?


From   jpitblado@stata.com (Jeff Pitblado, StataCorp LP)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: -kdensity, normal normopts(lpattern(dash))- ?
Date   Sat, 27 Mar 2004 22:55:52 -0600

Dimitris Christodoulou <absc11@bangor.ac.uk> asks about changing line styles
when using -kdensity-:

> What is the equivalent correct syntax for something like
> -normopts(lpattern(dash))- in the -kdensity- command? I wish to superimpose a
> normal density over a kernel estimator, but I need the normal curve to be
> dashed or dotted and not as thick as the line of the kernel.
> 
> Here is part of the (incorrect) command:
> -kdensity var, parzen lwidth(thick) normal normopts(lpattern(dash)
> lwidth(medium))-
> 
> Note that I will like the kernel line to be -lwidth(thick)- and the normal
> density line to be -lpattern(dash) lwidth(medium)-.

Use the cline_options (see help cline_options).  Here are the options
appropriate for Dimitris' example and the auto data:

	. sysuse auto, clear
	. kdensity mpg, parzen clwidth(thick) normopts(clpatter(dash))

--Jeff
jpitblado@stata.com
*
*   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