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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Determining mutual exclusivity for a series of dummy variables.


From   Richard Goldstein <richgold@ix.netcom.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Determining mutual exclusivity for a series of dummy variables.
Date   Fri, 08 Mar 2013 13:40:13 -0500

assuming you have 20 variables each coded 0/1, use -egen- with the
rowtotal option to get sum per unit across the 20; you could also check
the min/max values of the variables (to see if any have codes other than
0/1) using rowmin/rowmax (or using -assert- as a different strategy

Rich

On 3/8/13 1:35 PM, Stephen Cranney wrote:
> Hi all, quick question. I have about twenty separate dummy variables
> that, in theory, are supposed to be mutually exclusive. I did a
> regression with all the variables and it didn't kick out one of the
> variables automatically, so I assume that there is either some overlap
> or there are cases with zero values for all the variables. I checked
> the cases used in the regression using the "estimates store sample"
> command, and none of them have zero values for all the dummy
> variables, which leads me to believe that they aren't mutually
> exclusive. I've checked my coding numerous times and the coding for
> the variables seems accurate.
> So my question is: is there a parsimonious way to quickly check
> whether the series of dummy variables are mutually exclusive without
> having to check every combination by hand?
> 
> Thanks in advance,
> 
> Stephen
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index