Announcement

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

  • Interpretation of regression on panel data with two levels of observation

    Hello everyone,
    I have a regression as below:
    Code:
    xtreg financialperformance ageofcompany numberofphdstaff marketcompetition c.marketcompetition#c.numberofphdstaff, fe
    where market competition, is the level of competition according to market shares of active companies in the sector. so the level of observation of market competition is sector, and level of observation of other vars are firm. Can I run such a regression? and if yes, what are the interpretations of market competition and age of company coefficients in the presence and absence of the interaction term?

    Thank you in advance for your help.


    Last edited by Michael Lee; 09 Jul 2022, 03:14.

  • #2
    Michael:
    if your question is about the theoretical feasibility of this regression code, the aswer is yes, and you can also make it more compact and informative:
    Code:
     
     xtreg financialperformance c.ageofcompany##c.ageofcompany c.marketcompetition##c.numberofphdstaff i.year, fe
    If this code is in line with your research goals, I cannot say.

    1) c.ageofcompany##c.ageofcompany aims at detecting the presence of turning points:
    2) the interaction
    c.marketcompetition##c.numberofphdstaff shows, within each panel and other things being equal, if the market competition is influenced by the number of PhD employees (or the other way round) and its effect on the regressand, when adjusted for the remaining predictors.

    As an aside, you do not report the way you -xtset- your dataset.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you Carlo.
      about xtset:
      xtset firmid month

      you added i.year into the model to control for time fixed effects. how can I check whether should I include this term or not? when I add this, all of months coefficients are insignificant and my main variables also became insignificant.
      If I find seasonality, is controlling for this effect enough or I should add i.month?

      Also about 2: if the coefficient of c.marketcompetition##c.numberofphdstaff is positive and significant does it mean that in sectors with higher levels of competition, the higher number of phd staffs have a positive significant effect on financial performance of firm?


      Thank you again.

      Comment


      • #4
        Michael:
        1) add -i.months- vs. -i.year- in the right-hand side of your regression equation;
        2) it may be, but a more positive reply can only come from your sharing what Stata gave you back (as per FAQ). Thanks.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Carlo:

          When I set panel data as belows:

          xtset firmid month

          And run a xtreg ,fe

          1. Does it consider time and firm fixed effects or not?

          2. If not, shall I use i.month to consider time fixed effects?
          2-b. when my panel is at month level shall I use year or month fixed effect?

          3. what about i.firmid, does the fe model automatically consider this or not?

          4. Is there any test to show that whether is it necessary to add time or firm fixed effects or not?


          P.S: dataex error: input statement exceeds linesize limit. Try specifying fewer variables.
          But I think there is no need for the code right now to find the answer of the questions. I will handle it and send it, but if it is possible please help me in finding the answer of questions.

          Thank you in advance,
          Best Regards,
          Michael
          Last edited by Michael Lee; 09 Jul 2022, 22:43.

          Comment


          • #6
            Michael:
            1) yes, it does, but -timevar- is in months, not years;
            2) as per 1), you're using months timevar;
            3) yes;
            4) the -timevar- should be always included in -fe- specification. That said, you can test the joint statistical significance of -i.months- via -testparm-.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Carlo:
              Thank you.
              and last question, when should I use vce option in commands? exclusively, vce(cluster cluster)

              Comment


              • #8
                Michael:
                when your number of panels is at least 30 or 50, depending upon the sources and you detect heteroskedastcity and/or autocorrelation of the epsilon error term.
                Last edited by Carlo Lazzaro; 10 Jul 2022, 05:33.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Originally posted by Carlo Lazzaro View Post
                  Michael:
                  when your number of panels is at least 30 or 50, depending upon the sources and you detect heteroskedastcity and/or autocorrelation of the epsilon error term.
                  Thanks a lot.

                  data specification:
                  6 firms
                  3 sub-sectors
                  15 years (monthly) data-unbalanced panel data.
                  Still I have problems in using dataex.

                  I checked the results using xttest2, and chi-square is near 176 and Pr=0.00
                  Then what should I do?

                  Shall I use xtgls with i.month, i. firmid terms? or something else?

                  something like this:
                  Code:
                  xtgls  
                   xtreg financialperformance c.ageofcompany##c.ageofcompany c.marketcompetition##c.numberofphdstaff i.year i.firmid,panel(hetero)
                  Last edited by Michael Lee; 10 Jul 2022, 07:19.

                  Comment


                  • #10
                    MIchael:
                    you seem to have a T>N panel dataset (something relevant that shoud have been declared at the beginning of this thread to save everybody's time).
                    Therefore, -xtreg- is not the way to go.
                    The only way to go -fe- is -xtregar,fe-.
                    See also the following thread: https://www.statalist.org/forums/for...-xtgls-command
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #11
                      Carlo:
                      sorry for the inconvenience. Thank you for your insightful answers.
                      but does -xtregar- handle cross-sectional dependency and heteroskedasticity?

                      Originally posted by Carlo Lazzaro View Post
                      Saom:
                      two issues here:
                      1) if you have panel data with a continuous regressand, you should go -xtreg- first;
                      2) if you detect heteroskedsticity and/or autocorrelation, you should impose -robust- or -vce(cluster clusterid)- standard errors, that -hausman- does not support.
                      Hence you should compare -fe- vs. -re- via the community-contributed module -xtoverid- (just type -search xtoverid- to spot and install it).
                      As an aside, please do not post screenshots, but use CODE delimiters insteas (as per FAQ). Thanks.

                      it seems that I have to use strep ,fe with vce robust option! will it handle every concern that could somebody had about the results in this case?
                      Last edited by Michael Lee; 10 Jul 2022, 11:13.

                      Comment


                      • #12
                        What are pre- and post-estimation tests of -xtregar-?

                        Comment


                        • #13
                          Michael:
                          1) -xtregar- deal with AR1 T>N panel dataset. The -vce(cluster clusterid)- option is not available with -xtregar-;
                          2) see -xtregar postestimation-;
                          3) I do not know what -strep, fe- is.
                          Kind regards,
                          Carlo
                          (Stata 19.0)

                          Comment


                          • #14
                            Carlo:
                            Thank you very much!
                            3) I do not know what -strep, fe- is.
                            Oops! Keyboard autocorrection!!!
                            I meant xtreg ,fe vce(robust)

                            Comment


                            • #15
                              Michael:
                              if you have a T>N panel dataset, -xtreg- is not the way to go.
                              Kind regards,
                              Carlo
                              (Stata 19.0)

                              Comment

                              Working...
                              X