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

st: Re: How to find out whether a variable is a dummy variable ?


From   Thomas Corneli�en <[email protected]>
To   <[email protected]>
Subject   st: Re: How to find out whether a variable is a dummy variable ?
Date   Tue, 2 Aug 2005 17:31:30 +0200

I suppose I found a way myself combining

-sum- to check whether the minimum is 0 and the maximum is 1

and

-distinct- (if installed) to check whether there are only two distinct values.



----- Original Message ----- From: "Thomas Corneli�en" <[email protected]>
To: "statalist" <[email protected]>
Sent: Tuesday, August 02, 2005 5:24 PM
Subject: st: How to find out whether a variable is a dummy variable ?



Is there a programmer's command to find out whether a variable is a dummy variable ?
I need it because all dummy variables in my program are to be treated differently from continuous variables.

Thanks for any comments,
Thomas
[email protected]
*
* 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/
*
*   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