Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: basic if statement


From   "Donald Braman" <[email protected]>
To   [email protected]
Subject   Re: st: basic if statement
Date   Mon, 23 Jul 2007 00:37:31 -0400

thanks! -don

On 7/23/07, Keith Dear <[email protected]> wrote:
> 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/
>


-- 
-- 
Donald Braman
Associate Professor
GWU Law School
2000 H St NW
Washington, DC 20052

work: 202 994 0572
cell: 202 491 8843

http://research.yale.edu/culturalcognition
http://papers.ssrn.com/abstract=983525
*
*   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