Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: detecting a complete data set


From   Donald Spady <[email protected]>
To   [email protected]
Subject   Re: st: detecting a complete data set
Date   Tue, 16 Nov 2010 08:26:28 -0700

Thanks very much.  I am always impressed by the speed of help and the friendly, complete, and expert information given when one appeals to Statalist.  Whenever I talk to my colleagues about Stata as a possible stats program to buy, I mention this listserv because, to my mind, it is part of what makes Stata such a wonderful program.

Don
   
On 2010-11-16, at 8:01 AM, Maarten buis wrote:

> --- On Tue, 16/11/10, Donald Spady wrote:
>> I assume that if complete takes the value 0 that there
>> are missing data, and if it takes the value 1 then the
>> data are complete.
> 
> Yes, I use the convention that 1 equals "true" or "on" 
> and 0 equals "false" or "off". So if an observation has
> a 1 on the variable complete then it is complete, and 
> when it has a 0 than it is not complete. 
> 
>> I am unsure about the grammer of "gen byte complete =
>> totmis == 0"  Does this mean "generate complete = 1 IF
>> totmis == 0"
> 
> No, you can read this command as follows:
> gen byte complete = ( totmis == 0 )
> 
> The logical statement -( totmis == 0 )- returns a 1 if it
> is true and a 0 if it is false.
> 
> An alternative way of creating this variable would be:
> gen byte complete = cond( totmis == 0, 1, 0 )
> 
> see -help cond- for this latter solution.
> 
> Hope this helps,
> Maarten
> 
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
> 
> http://www.maartenbuis.nl
> --------------------------
> 
> 
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 

Don Spady

Nature bats last.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index