Announcement

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

  • #16
    Harsh:
    yes, it's legal but you end up with a log-log regression model.
    The interpretation of its coefficients (sometimes tricky) is covered in any decent econometrics textbook.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #17
      Carlo how to use interaction terms when you do this....for example performance diversification and moderation of debt.... All variables are log..... Interactions become almost impossible to calculate what to do then? Should the logs be just removed and kept in different models?

      Comment


      • #18
        In my view, T = 15 is too small to trust the Newey-West type standard errors computed by xtscc. In many cases, using cross-sectional and time fixed effects will remove the cross-sectional dependence. This is one reason to include year dummies because common shocks can lead to cross-sectional correlation. As others have said, fixed effects should be the default. Going to random effects is usually an act of desperation.

        With your N and T, since your i represents geography, I would use two-way fixed effects and compute so-called SHAC standard errors. These are robust to spatial correlation as well as heteroskedasticity and serial correlation. But you need to create a weighting matrix, and that requires you to provide latitude, longitude, and a distance truncation parameter. The contributed command acreg does this very nicely. Don't test for normality or heteroskedasticity. Use TWFE with acreg and compute sufficient robust standard errors.

        There's nothing wrong with using logged variables in interactions. Just remember to make small changes in the logged variable. If log(x) increases by 0.1 that's a 10% increase in x.

        Comment


        • #19
          thanks jeff for your reply......but if im not wrong xtscc generate Driscoll and Kraay standard errors. Could you confirm if we are talking of separate things or some misunderstanding. Even when I add i.timeseries and use the command xtreg, fe the cross sectional dependence is still present. And my N are companies, there are no variables wrt to geography.

          Thanks for the logged variable answer...!!!

          look forward to hear from you.

          Comment


          • #20
            Driscoll-Kraay is an application of Newey-West applied to the cross-sectional averages. It requires “large” T for justification. If your unit is company then don’t even test for cross-sectional dependence. The variables of interest vary by company, correct?

            Comment


            • #21
              Yes they do. so the data is 157 companies and 15 financial year for each. 14 variables. so if i don't test for cross sectional dependence, isn't the robust or cluster commands with xtreg going to do the job.

              Comment


              • #22
                so i check for normality (swilk var), hetro (xttest3), autocorrelation(xtserial var), endogeneity(could you suggest a test for this) and Multicollinearity (vif) then i do xtreg cluster for the regression analysis. Is ithis it then.....could you please share why not check in case of company as a unit. Thanks sir for all this guidance, you just changed the direction of my research analysis. Could you please add if i need to add any most tests in the analysis.

                Regards
                Harsh

                Comment


                • #23
                  Why are you testing for all of those things? They aren't needed for anything. With T = 15 you can't allow general cross-sectional dependence, anyway. Only if you have some measure of "economic distance" between firms can you do it, and that is difficult and controversial.

                  In my work on clustering with Abadie, Athey, and Imbens (2017 NBER Working Paper, "When Should You Adjust Standard Errors for Clustering?") we emphasize that tests for cross-sectional dependence are not very informative. Even if you take ra random sample they will often reject if there are heterogeneous effects. So you'll be led to cluster your standard errors unnecessarily, or adjust them for spatial correlation. If the variables change at the level of the firm then no adjustments are necessary. You should use xtreg with the vce(cluster firmid) option to account for serial correlation and heteroskedasticity. You should use firm and year fixed effects.

                  Comment


                  • #24
                    Dear Professor Wooldridge,

                    Thank you very much for sharing your 2017 paper. I have just read it, wrote down a few pages of notes and learned a lot. I just wanted to share that I discovered and learned econometrics with your textbooks, and that I am a great fan of your work.

                    Best regards,
                    Maxence

                    Comment


                    • #25
                      Hi, if somebody could help me, how to decide whether group variable will be unit or time? Is there any test for that? I understand how to decide between fixed effect and random effect, but first step is somehow unclear for me... Thank you. (my data are stock return, monthly data for 15 years).

                      Comment


                      • #26
                        Zrinka:
                        this a very basic concern. Therefore, I would warmly recommend you to study any decent panel data econometrics textbook (otherwise I fear you feel a bit lost).
                        That said:
                        1) -company- is probably your -panelid-;
                        2) -monthly_data- is your -timevar-;
                        3) you should -xtset- your data with both 1) and 2);
                        Kind regards,
                        Carlo
                        (Stata 18.0 SE)

                        Comment


                        • #27
                          Hi, thanks, maybe I was a bit unclear, sorry for that. I understand xtset, but the situation is that I run FE test first with unit as group variable (alpha i), and then time (alpha t) - and F test showed for both significant level. So I do not know shall I proceed with fixed effect unit as group variable or time fixed effect, that is my question...

                          Comment


                          • #28
                            Zrinka:
                            sorry but I do not follow you.
                            Assuming that you're using -xtreg,fe- (as per FAQ, please note that the your chances of getting (more) helpful replies is conditional on sharing via CODE delimiters what you typed and what Stata gave you back), you cannot plug in -panelid- as a predictor if this is what you're meaning;
                            2) conversely, plugging in -i-timevar- is a very good idea and you can check the joint statitical significance of this predictor via -testparm-.
                            Kind regards,
                            Carlo
                            (Stata 18.0 SE)

                            Comment


                            • #29
                              Zrinka:
                              I should have been more detailed as far as the point 1) of my last reply is concerned.
                              You can plug in -i.panelid- as a predictor in the right-hand side of your -xtreg,fe- regression, but it takes longer to give you back the very same results, as you can see from the following toy-example:
                              Code:
                              use "https://www.stata-press.com/data/r16/nlswork.dta"
                              . xtreg ln_wage i.year i.idcode if idcode<=2, fe
                              note: 2.idcode omitted because of collinearity
                              
                              Fixed-effects (within) regression               Number of obs     =         24
                              Group variable: idcode                          Number of groups  =          2
                              
                              R-sq:                                           Obs per group:
                                   within  = 0.7847                                         min =         12
                                   between = 1.0000                                         avg =       12.0
                                   overall = 0.5854                                         max =         12
                              
                                                                              F(12,10)          =       3.04
                              corr(u_i, Xb)  = -0.0931                        Prob > F          =     0.0440
                              
                              ------------------------------------------------------------------------------
                                   ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                      year |
                                       71  |  -.0482927   .3477954    -0.14   0.892    -.8232292    .7266439
                                       72  |   .1553108   .3477954     0.45   0.665    -.6196257    .9302473
                                       73  |   .4223012   .3477954     1.21   0.253    -.3526353    1.197238
                                       75  |   .5620197   .3477954     1.62   0.137    -.2129168    1.336956
                                       77  |   .5099242   .3477954     1.47   0.173    -.2650124    1.284861
                                       78  |   .8491663   .3477954     2.44   0.035     .0742298    1.624103
                                       80  |   .8965631   .3477954     2.58   0.028     .1216266      1.6715
                                       82  |   .7739492   .4132426     1.87   0.091    -.1468126    1.694711
                                       83  |   .8990626   .3477954     2.59   0.027      .124126    1.673999
                                       85  |   .9589929   .3477954     2.76   0.020     .1840563    1.733929
                                       87  |   .9486753   .3477954     2.73   0.021     .1737388    1.723612
                                       88  |   .9169113   .3477954     2.64   0.025     .1419747    1.691848
                                           |
                                  2.idcode |          0  (omitted)
                                     _cons |   1.242777   .2860542     4.34   0.001     .6054081    1.880145
                              -------------+----------------------------------------------------------------
                                   sigma_u |  .29477487
                                   sigma_e |  .27976654
                                       rho |  .52610446   (fraction of variance due to u_i)
                              ------------------------------------------------------------------------------
                              F test that all u_i=0: F(1, 10) = 12.21                      Prob > F = 0.0058
                              
                              . xtreg ln_wage i.year if idcode<=2, fe
                              
                              Fixed-effects (within) regression               Number of obs     =         24
                              Group variable: idcode                          Number of groups  =          2
                              
                              R-sq:                                           Obs per group:
                                   within  = 0.7847                                         min =         12
                                   between = 1.0000                                         avg =       12.0
                                   overall = 0.5854                                         max =         12
                              
                                                                              F(12,10)          =       3.04
                              corr(u_i, Xb)  = -0.0931                        Prob > F          =     0.0440
                              
                              ------------------------------------------------------------------------------
                                   ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                      year |
                                       71  |  -.0482927   .3477954    -0.14   0.892    -.8232292    .7266439
                                       72  |   .1553108   .3477954     0.45   0.665    -.6196257    .9302473
                                       73  |   .4223012   .3477954     1.21   0.253    -.3526353    1.197238
                                       75  |   .5620197   .3477954     1.62   0.137    -.2129168    1.336956
                                       77  |   .5099242   .3477954     1.47   0.173    -.2650124    1.284861
                                       78  |   .8491663   .3477954     2.44   0.035     .0742298    1.624103
                                       80  |   .8965631   .3477954     2.58   0.028     .1216266      1.6715
                                       82  |   .7739492   .4132426     1.87   0.091    -.1468126    1.694711
                                       83  |   .8990626   .3477954     2.59   0.027      .124126    1.673999
                                       85  |   .9589929   .3477954     2.76   0.020     .1840563    1.733929
                                       87  |   .9486753   .3477954     2.73   0.021     .1737388    1.723612
                                       88  |   .9169113   .3477954     2.64   0.025     .1419747    1.691848
                                           |
                                     _cons |   1.242777   .2860542     4.34   0.001     .6054081    1.880145
                              -------------+----------------------------------------------------------------
                                   sigma_u |  .29477487
                                   sigma_e |  .27976654
                                       rho |  .52610446   (fraction of variance due to u_i)
                              ------------------------------------------------------------------------------
                              F test that all u_i=0: F(1, 10) = 12.21                      Prob > F = 0.0058
                              
                              .
                              Kind regards,
                              Carlo
                              (Stata 18.0 SE)

                              Comment


                              • #30
                                Dear Carlo, thank you so much for your reply. Regarding 2) plugging in -i-timevar- is a very good idea and you can check the joint statitical significance of this predictor via -testparm-. Why joint significance? Why cannot I check just i-timevar whether it is significant? And for i-panelid separately and if both are significant, which one shall I pick? The one where group variable is time or the one where group variable is panelid? Thank you in advance.
                                Last edited by Zrinka Lovretin Golubic; 26 Nov 2021, 14:05.

                                Comment

                                Working...
                                X