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   Kieran McCaul <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: _rmcoll issues
Date   Wed, 11 Dec 2013 12:27:28 +0800

...

How about:

. tab pd2usmex years_in_us [fw=wt]

           |                 years_in_us
  pd2usmex |         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 


. 
. _rmcoll ib2.pd2usmex ib2.years_in_us [fw=wt]
note: 1.years_in_us omitted because of collinearity

. 
. _rmcoll ib2.pd2usmex##ib2.years_in_us [fw=wt]
note: 1.years_in_us omitted because of collinearity
note: 1.pd2usmex#1.years_in_us omitted because of collinearity
note: 1.pd2usmex#2.years_in_us identifies no observations in the sample
note: 1.pd2usmex#3.years_in_us identifies no observations in the sample
note: 1.pd2usmex#4.years_in_us identifies no observations in the sample
note: 2.pd2usmex#1.years_in_us identifies no observations in the sample
note: 9.pd2usmex#1.years_in_us identifies no observations in the sample


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Stas Kolenikov
Sent: Wednesday, 11 December 2013 11:44 AM
To: [email protected]
Subject: Re: st: _rmcoll issues

That's still not the right answer to the problem. I ended up creating the interaction of the two with seven levels, and using that in the regression, although I would rather have the main effects.

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



On Tue, Dec 10, 2013 at 10:39 PM, Richard Williams <[email protected]> wrote:
> 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/
*
*   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/

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