Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • omitted because of collinearity

    Good evening,

    I need your help for an issue that I have using stata. I am using panel data and I tried to run some regression for my analysis, but most of my dummy variables were omitted from stata because of collinearity. I read many post with the same problem but I didn't find a clear solution, most of them they purposed to not include these dummies, however in my case I cannot ignore this dummies as are important for my analysis. Is there something that I can do?
    Thank you very much in advance.

  • #2
    If Stata is eliminating variables due to colinearity, then there is simply no mathematical possibility of estimating the effects of all of those variables. This is not peculiar to Stata: it is mathematics and you will run into the same thing with any statistical package (although a different statistical package might omit different variables.) Whether you want to ignore them or not, you have no choice in the matter.

    What you do have choice over is which variables to omit. So the first thing you need to do is to determine which variables are involved in the colinear relationship(s). For each of the omitted variables, you can run a regression with that variable as the outcome and all the other predictors from the original model as predictors. That will come out with an R2 = 1 (or within rounding error of 1) and the coefficients will show you which variables are colinear. You can then decide which among those variables you prefer to omit if you want to keep the one that Stata omitted.

    Then re-do your original model leaving out the variables that you don't mind omitting, and the rest will remain.

    If you absolutely cannot see your way to omitting any of the offending variables then either your research question is ill-posed
    and seeks to do the impossible, or you have collected data in a design that inappropriate to your research goals.

    Comment


    • #3
      Evangelia:
      just two asides to Clyde's excellent advice:
      - you should skim through the literature in your research field and check whether the predictors that you selected are reported in previous researches on the same topic;
      - posting what you typed and what Stata gave you back (as recommended by FAQ) is the best way to helpful replies that fit your case.
      Kind regards,
      Carlo
      (StataNow 18.5)

      Comment


      • #4
        I am encountering the same problems and all my dummy variables are getting omitted due to multicollinearity (because they are time-invariant). Is there a solution out of it? I read literature and articles which have performed similar exercise in the past, but somehow I am not getting results. What am I doing wrong?
        I am attaching links who have performed similar exercise before.These are - https://iari.res.in/files/Divisions/...ed_%20AJAE.pdf and http://www.isec.ac.in/ISEC%20AR%202018-19_English.pdf for reference. I am taking exactly these variables but am unable to get results.

        Please help.
        Carlo Lazzaro

        Comment


        • #5
          Shelly:
          the -fe- estimator, by construction wipes out all the time-invariant variables (no matter if categorical, count or continuous).
          Hence, the only fix is to change estimator: see the community-contributed command -mundlak- in addition to -xtreg,re-.
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment


          • #6
            Thanks Carlo Lazzaro sir. I tried running -xtreg,re- but none of my dummy variables came significant. And mundlak command gave the following result- "The variable contig does not vary sufficiently within groups and will not be used to create additional regressors.
            0% of the total variance in contig is within groups."


            And -mundlak, full- gave this output-
            None of the independent variables varies within groups.
            Group-mean variables were not added to the random-effects model.

            Comment


            • #7
              Shelly:
              was does -xttest0- return after -xtreg,re- has been run?
              Kind regards,
              Carlo
              (StataNow 18.5)

              Comment


              • #8
                . xttest0

                Breusch and Pagan Lagrangian multiplier test for random effects

                logxt[combinationid,t] = Xb + u[combinationid] + e[combinationid,t]

                Estimated results:
                Var sd = sqrt(Var)
                ---------+-----------------------------
                logxt 17.53509 4.187492
                e 1.890719 1.375034
                u 6.135977 2.47709

                Test: Var(u) = 0
                chibar2(01) = 9228.51
                Prob > chibar2 = 0.0000
                Last edited by Shelly Gupta; 14 Dec 2021, 03:13.

                Comment


                • #9
                  . xttest0

                  Breusch and Pagan Lagrangian multiplier test for random effects

                  logxt[combinationid,t] = Xb + u[combinationid] + e[combinationid,t]

                  Estimated results:
                  Var sd = sqrt(Var)
                  ---------+-----------------------------
                  logxt 17.53509 4.187492
                  e 1.890719 1.375034
                  u 6.135977 2.47709

                  Test: Var(u) = 0
                  chibar2(01) = 9228.51
                  Prob > chibar2 = 0.0000

                  Comment


                  • #10
                    Shelly:
                    so why not going -xtreg,re-?
                    Kind regards,
                    Carlo
                    (StataNow 18.5)

                    Comment


                    • #11
                      Carlo Lazzaro Sir, with -xtreg,re- none of my dummy variables for RTAs are significant, so the exercise becomes futile. Because then there is nothing to explain.

                      Comment


                      • #12
                        Shelly:
                        failing to reach statistical significance is as informative as the opposite result.
                        The issue is to understand why coefficients reach (or not) statistical significance.
                        Posting what you typed and what Stata gave yu back would help enormously interested listers to reply (more) positively. Thanks.
                        Kind regards,
                        Carlo
                        (StataNow 18.5)

                        Comment


                        • #13
                          This is what I got. Thankyou for your advice and suggestions.

                          Click image for larger version

Name:	reg result.PNG
Views:	1
Size:	38.3 KB
ID:	1641021

                          Comment


                          • #14
                            Shelly:
                            assuming that you've already checked that your model is correctly specified. I do not see any reason for complaining about the results you got.
                            The panel-effect is evident, some coefficients are highly significant, the between R-sq (the one to consider when we go -re-) is encouraging.
                            It may well be that the categorical variables that "let you down" are simply substantively correlated and it is hard for -xtreg.re- to disentangle their contribution (when adjusted for the other predictords) to variations of the regressand.
                            Kind regards,
                            Carlo
                            (StataNow 18.5)

                            Comment


                            • #15
                              Thank you so much Carlo Lazzaro sir for such encouragement. Is there a way to check for model misspecification errors? I am a little concerned because my exercise to see the trade creation and trade diversion impact of these RTAs and to see their impact I have taken them in the form of dummy variables. And when they become insignificant, I can not explain their impact. That is why a little concerning.

                              Comment

                              Working...
                              X