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

st: Re: -graph twoway || - and -if-


From   Friedrich Huebler <[email protected]>
To   [email protected]
Subject   st: Re: -graph twoway || - and -if-
Date   Thu, 29 Jul 2004 06:58:32 -0700 (PDT)

Dimitris,

This works for me. Is sample = 1 for all observations? Do you use
other options?

. sysuse auto, clear
. gen weight2 = 1.2*weight
. gen weight3 = 1.4*weight
. graph twoway kdensity weight || kdensity weight2 || kdensity
weight3
. graph twoway kdensity weight if foreign==1 || kdensity weight2 if
foreign==1 || kdensity weight3 if foreign==1
. graph twoway kdensity weight if foreign==0 || kdensity weight2 if
foreign==0 || kdensity weight3 if foreign==0

Friedrich Huebler

--- "D.Christodoulou" <[email protected]> wrote:
> My question concerns the use of -if expression- along with -graph
> twoway-.
> When I use the following command:
> 
> graph twoway kdensity var1 if sample==1 || kdensity  var2  if 
> sample==1 ||
> kdensity  var3 if sample==1 || ....
> 
> ...Stata does not recognise the (repeated) restriction of the - if
> sample==1 - and plots the whole sample.
> All I want to do is restrict the sample in a comparable (and
> desirable)
> range for all kdensities.
> 
> What is the correct way to do this?



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
*
*   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