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: _rmcoll issues


From   Richard Williams <[email protected]>
To   [email protected], "[email protected]" <[email protected]>
Subject   Re: st: _rmcoll issues
Date   Tue, 10 Dec 2013 22:39:47 -0500

At 05:31 PM 12/10/2013, Stas Kolenikov wrote:
I have the following cross-tab of two variables:

. tab pd2usmex years_in_us

 PD2. What |
   country |
  were you |                 years_in_us
  born in? |         1          2          3          4 |     Total
-----------+--------------------------------------------+----------
         1 |       240          0          0          0 |       240
         2 |         0        103        451        378 |       932
         9 |         0         33         99        123 |       255
-----------+--------------------------------------------+----------
     Total |       240        136        550        501 |     1,427

For whatever reason, _rmcoll senses that something is fishy between
the two variables, but decides to drop the last category of the second
variable, rather than the first one on which these two variables
logically overlap.

. _rmcoll ib1.pd2usmex ib1.years_in_us
note: 4.years_in_us omitted because of collinearity

I think this is a bit odd.

I think it just goes with the highest code. Try running this (drop the fws if you don't need them):

preserve
recode years_in_us (3 = 5)
_rmcoll ib1.pd2usmex ib1.years_in_us [fw = freq]
recode years_in_us (2 = 6)
_rmcoll ib1.pd2usmex ib1.years_in_us [fw = freq]
restore
preserve
recode years_in_us (1 = 5)
recode years_in_us (2 = 1)
_rmcoll ib1.pd2usmex ib1.years_in_us [fw = freq]
restore

The highest value always gets dropped.


-- Stas Kolenikov, PhD, PStat (ASA, SSC)
-- Senior Survey Statistician, Abt SRBI
-- Opinions stated in this email are mine only, and do not reflect the
position of my employer
-- http://stas.kolenikov.name
*
*   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/

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]
WWW:    http://www.nd.edu/~rwilliam

*
*   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