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

RE: st: Kdensity

From   [email protected] (Derek Wagner, StataCorp)
To   [email protected]
Subject   RE: st: Kdensity
Date   Tue, 09 Mar 2004 09:55:46 -0600

R.E. De Hoyos wrote:

> How can I graph two--or more--kdensities (using weights) in the
> same graph?

You can use the -twoway kdensity- command to graph more than one
kdensity in the same graph.  Although the help file for -twoway
kdensity- doesn't show a -weight- option, weights can indeed be
used with the command (the help file will be changed in a future
update).  Since you want more than one kdensity in the same
graph, you'll need to overlay two -twoway kdensity- graphs along
with a weight for each.  For example:

. tw kdensity var1 [w=weight1] || kdensity var2 [w=weight2]

You can find further information on -twoway kdensity- in [G]
-graph twoway kdensity-.

Derek Wagner
<[email protected]>
*   For searches and help try:

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