Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Confirming whether a variable is binary or continuous


From   daniel klein <klein.daniel.81@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Confirming whether a variable is binary or continuous
Date   Sat, 17 Mar 2012 00:39:58 +0100

Nick,

very smart solution, thanks. Seems it is often the simple solutions
that are so hard to find.

The difference to the "-tabulate- solution" is that <var> is allowed
to be a constant here, which is perfectly alright for a binary
variable. It is for Bert to decide whether the indicators are allowed
to be constant or have to vary.

Daniel

-- 
You can also do this by e.g.

assert inlist(var, 0. 1)
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index