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: regression factor variables and multicollinearity


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: regression factor variables and multicollinearity
Date   Fri, 14 Feb 2014 11:11:57 +0100

If you create the interactions using factor variables, then Stata
knows that it needs to omit a refernce category for each categorical
variable and it has a fixed rule for doing so: by default it omits the
category with the smallest numerical value, but you can change that.
If you create the variables yourself, it just sees that a set of
variables and it has no a priori knowledge that it might need to omit
one for a reference category. Only after it starts working with those
variables it finds that there is a problem with perfect
multicolinearity. It than knows which set of variables belong together
in the sense that they cause perfect multicolinearity, but it cannot
have such a standard rule of which to omit as with the factor
variables. So I would not expect the two methods to result in the same
reference category.

Hope this helps,
Maarten

On Thu, Feb 13, 2014 at 8:27 PM, simone pedemonte
<[email protected]> wrote:
> Dear all,
>
> I am running a linear regression on three dummy variables, one
> categorical variable, plus all their interactions.
>
> I understand the basic stata command to do this should be:
>
> reg y  d1##d2##d3##x
>
> where x has six categories.
>
> I tried to create the variables myself to double check, so I generated
> variables for the full set of interactions, and I ran the same
> regression (omitting one the same categories in both regressions).
>
> I can't understand why the two regressions give me exactly the same
> results (coefficients, std errors, etc.) except for the fact that
> different coefficients are omitted by stata because of collinerarity.
> Does anyone know why that could happen?
>
> Thank you,
>
> Simone Pedemonte
> *
> *   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/



-- 
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   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