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: Determining mutual exclusivity for a series of dummy variables.


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Determining mutual exclusivity for a series of dummy variables.
Date   Fri, 8 Mar 2013 18:49:41 +0000

That's the first thing I thought of too.

Another thing is to look at the correlation matrix using -correlate-.

The diagonal is all 1s as usual. A variable out of line will have
correlations distinct from others in the same row and column, or so
experiment indicates.

Nick

On Fri, Mar 8, 2013 at 6:40 PM, Richard Goldstein
<[email protected]> wrote:
> 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?
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index