[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: basic if statement
From
Keith Dear <[email protected]>
To
[email protected]
Subject
Re: st: basic if statement
Date
Mon, 23 Jul 2007 14:31:42 +1000
Donald,
Instead, write "list var1 if var2==float(.07)".
It's explained at:
http://www.stata.com/support/faqs/data/float.html
kd
At 02:17 PM 23/07/2007, Donald Braman wrote:
I'm trying to understand how the if statement works. I have two
variables, var1 and var2. let's say that they're as follows:
var1 var2
.09 0
.01 0
.03 .07
.05 .07
.09 .08
If I type "list var1 if var2==0", I get, as I expected, a result list
containing .09 & .01 .
But if I type "list var1 if var2==.07", I get nothing.
Clearly, I'm missing something. What? (I've attached the data in case
that helps.)
Content-Type: application/octet-stream; name="data.dta"
Content-Disposition: attachment; filename="data.dta"
X-Attachment-Id: f_f4gg6afq
*
* 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 |