Announcement

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

  • fixed effects and dummy variable

    hi all,
    i am trying to use 'xtreg avginflation cbi exrate i.dum, fe' but the dummy variable keeps getting omitted because of collinearity. is there anything i can do to fix this? please i a am not a pro at stata and i am just looking for advice/help. thanks!

  • #2
    Mundlak regression might work.

    ssc install xthybrid

    See Jeff Wooldridge's work on this.

    Comment


    • #3
      Originally posted by George Ford View Post
      Mundlak regression might work.

      ssc install xthybrid

      See Jeff Wooldridge's work on this.
      hi thank you for the help but i'm afriad it is still not working. i have no idea what's wrong

      Comment


      • #4
        Rebecca:
        one of the most valuable FAQ recommendations is to post what you typed and what Stata gave you back. Thanks.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          What does i.dum measure and what is your FE?

          Comment


          • #6
            Originally posted by Carlo Lazzaro View Post
            Rebecca:
            one of the most valuable FAQ recommendations is to post what you typed and what Stata gave you back. Thanks.
            thank you for this. i will make sure to do this when asking for help!

            Comment


            • #7
              Originally posted by George Ford View Post
              What does i.dum measure and what is your FE?
              i.dum is the level of development for the 8 countries (0 for developed and 1 for developing) and for xtset i used the countries and years

              Comment


              • #8
                which variable is omitted in estimation and what does it measure?

                Comment


                • #9
                  Originally posted by Rebecca Nnamani View Post

                  i.dum is the level of development for the 8 countries (0 for developed and 1 for developing) and for xtset i used the countries and years
                  Unless a country transitions from developing to developed during the sample period or vice versa, the coefficient on the variable will be collinear with the country effects, rendering it unidentifiable. If your intention is to account for the developmental differences between countries, the country effects already do this, making it unnecessary to include this variable in the model. However, if you aim to examine the impact of development on your outcome, consider incorporating income per capita. This variable varies across countries and over years, largely signifying a country's developed or developing status. Income per capita data is readily available from sources like the World Bank and the Penn World Tables.

                  Comment


                  • #10
                    Originally posted by George Ford View Post
                    which variable is omitted in estimation and what does it measure?
                    the dummy variable for developing countries: i.dum

                    Comment


                    • #11
                      Originally posted by Andrew Musau View Post

                      Unless a country transitions from developing to developed during the sample period or vice versa, the coefficient on the variable will be collinear with the country effects, rendering it unidentifiable. If your intention is to account for the developmental differences between countries, the country effects already do this, making it unnecessary to include this variable in the model. However, if you aim to examine the impact of development on your outcome, consider incorporating income per capita. This variable varies across countries and over years, largely signifying a country's developed or developing status. Income per capita data is readily available from sources like the World Bank and the Penn World Tables.
                      omg thank you so so much it worked after i used xtset year! and just to check it's alright for me to use year as the xtset?

                      Comment


                      • #12
                        I don't think that's correct. xtset year is going to give you a year fixed effect, not a country one.

                        I hink you need

                        xtset country

                        but do not include i.dum as a regressor.

                        Comment


                        • #13
                          Originally posted by George Ford View Post
                          I don't think that's correct. xtset year is going to give you a year fixed effect, not a country one.

                          I hink you need

                          xtset country

                          but do not include i.dum as a regressor.
                          ah ok thank you. do you have any solutions to this as i am back to square one?

                          Comment


                          • #14
                            Rebecca:
                            if your -i.dum- is collinear with your -panelid-, the -fe- estimator will omit it, as it is time-invariant.
                            Please note that:
                            a) the -fe- estimator wipes out all the time-invariant variables;
                            b) the -fe- estimator uses the within-panel demeaning approach. As the mean of a constant is the constants itself, the related coefficient cannot be estimated.
                            Kind regards,
                            Carlo
                            (Stata 19.0)

                            Comment


                            • #15
                              Code:
                              xtset country year
                              
                              ** simple
                              xtreg avginflation cbi exrate , fe
                              
                              ** maybe
                              xtreg avginflation cbi exrate i.year, fe
                              
                              ** alternate
                              reghdfe avginflation cbi exrate, absorb(dum) 
                              reghdfe avginflation cbi exrate, absorb(dum year)

                              Comment

                              Working...
                              X