Announcement

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

  • Paneldata Analysis-Steps to follow

    Hello,
    for my research I have to do a paneldata analysis and I would like to know if there are steps to follow in order to get valid and robust results. I have paneldata for a time period of 50 years and five independent variables.
    What I did until now is the following:
    1. xtreg y x i e z u, re robust (Random effects regression)
    2.Xttest0 (Test if pooled OLS is appropriate)
    3. Xtoverid (Test if fixed effects or random reffects to choose)
    As result I got that I have to choose the fixed effects model. How can I check now for these points in my panel data in order to obtain unbiased results:

    4. Multicollinearity
    5. Homoscedasticity
    6. Autocorrelation
    7. Normally distributed error term
    8. How can I decide whether or not to include time-fixed effects?
    9. Is there something like a model specification test which says that my model is appropriate?

    Thank you for your help

    Christian


  • #2
    Christian:
    welcome to the list.
    -xtreg- and -xtreg postestimation- entries in Stata .pdf manual covers all the topics you're interested in (I would add to the list -hausman- specification test).
    For the future, posting what you typed and what Stata gave you back will increase your chances of getting more helpful replies (as per FAQ). Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hello Carlo,

      thank you for your answer. Now in more detail. I want to estimate the effect of some variables on capital expenditures:

      1.xtreg capx_at_w Tobin_Q_w cashflow_w leverage_w che_w, re robust
      2. xttest0 (Test if pooled OLS is appropriate)
      Output: Breusch and Pagan Lagrangian multiplier test for random effects

      capx_at_w[conm,t] = Xb + u[conm] + e[conm,t]

      Estimated results:
      | Var sd = sqrt(Var)
      ---------+-----------------------------
      capx_at_w | .0069986 .0836577
      e | .003402 .0583269
      u | .0047764 .0691118

      Test: Var(u) = 0
      chibar2(01) = 1.4e+05
      Prob > chibar2 = 0.0000


      3.xtoverid (Test if fixed effects or random effects are appropriate)
      Output:
      Test of overidentifying restrictions: fixed vs random effects
      Cross-section time-series model: xtreg re robust cluster(conm)
      Sargan-Hansen statistic 528.762 Chi-sq(4) P-value = 0.0000


      So finally I choose the fixed effects model because RE and pooled OLS are not appropriate.


      4.xtreg capx_at_w Tobin_Q_w cashflow_w leverage_w che_w, fe robust
      Output:

      Fixed-effects (within) regression Number of obs = 114411
      Group variable: conm Number of groups = 8788

      R-sq: within = 0.1146 Obs per group: min = 1
      between = 0.0068 avg = 13.0
      overall = 0.0345 max = 53

      F(4,8787) = 615.73
      corr(u_i, Xb) = -0.1984 Prob > F = 0.0000

      (Std. Err. adjusted for 8788 clusters in conm)
      ------------------------------------------------------------------------------
      | Robust
      capx_at_w | Coef. Std. Err. t P>|t| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      Tobin_Q_w | .0139907 .0003026 46.24 0.000 .0133976 .0145837
      cashflow_w | 1.52e-06 1.15e-06 1.32 0.188 -7.44e-07 3.78e-06
      leverage_w | -3.22e-06 4.10e-07 -7.86 0.000 -4.02e-06 -2.42e-06
      che_w | -.0000153 1.26e-06 -12.16 0.000 -.0000178 -.0000129
      _cons | .0584618 .0006402 91.32 0.000 .0572069 .0597167
      -------------+----------------------------------------------------------------
      sigma_u | .07619167
      sigma_e | .05832688
      rho | .63050365 (fraction of variance due to u_i)


      So what I would like to know is, whether this regression is now valid and unbiased. Do I have to check for multicollinearity, homoscedasticity, autocorrelation and normally disbributed errors terms or am I finished now and the model is good?
      Thanks for your help!

      Comment


      • #4
        For a better reading:
        capx_at_w Coeff std.err t p conf intervall
        Tobin_Q_w 0.0139 0.00306 46.24 0.000
        cashflow_w 1.52e-0.6 1.15e-0.6 1.32 0.188
        leverage_w -3.22e-0.6 4.10e-0.7 -7.86 0.000
        che_w -0.000153 1,26e-0.6 -12.16 0.000
        cons






        Comment


        • #5
          Christian:
          yes, you have to check for the model specification items that you have listed, exception made for autocorrelation and heteroskedasticitty, which are managed by the -robust()- option of standard errors.
          As a closing-out remark, I notice that your R-sq within is quite low: this results may be consistent with the outcome of other researches published or may be due to a limited number of predictors (put differently, your regression model may suffer from omitted variable bias and possible endogeneity).
          For the future, please consider posting what you typed and what Stata gave you back via CODE delimiters (this topic, among others, is covered in the FAQ).
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Hello Carlo,
            thank you again for your answer. Two mor questions.
            1. You said that I don´t have to test for heteroskedasticity. But if I execute the following commands I get:

            xtreg capx_at_w Tobin_Q_w cashflow_w leverage_w che_w, fe robust

            Xttest3 (test for heteroscedastitcity)

            Output:

            Modified Wald test for groupwise heteroskedasticity
            in fixed effect regression model

            H0: sigma(i)^2 = sigma^2 for all i

            chi2 (8788) = 4.9e+40
            Prob>chi2 = 0.0000


            This output tells me that there is still heteroscedasticity although I used roubst standdard errors. How is this possible?


            2. How can I test for endogenity? I did not find a command.


            Thank you for your help

            Christian

            Comment


            • #7
              Christian:
              1) With such a large sample the -xttest3- (since it is not a Stata official command, you are kindly requested to report wher you download it from. The reason for this seemingly pedanti requirement are reported in the FAQ) may end up statistically significant; I would not be worried about its outcome;
              2) Endogeneity has more to do with the theory of your resarch field than with formal tests. For instance: can you rule out that an omitted variable embedded in residuals can influence one or more predictors and the dependent variable at the same time?
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Hell Carlo,
                thank you again. But I have got the same problem with the command xtserial.
                I did the following steps:
                1.xtreg capx_at_w Tobin_Q_w cashflow_w leverage_w che_w, fe cluster (conm)
                2. Xtserial (Test for autocorrelation)
                Output:
                xtserial capx_at_w Tobin_Q_w cashflow_w leverage_w che_w

                Wooldridge test for autocorrelation in panel data
                H0: no first-order autocorrelation
                F( 1, 7704) = 1931.843
                Prob > F = 0.0000

                How is it possible that there is still autocorrelation although I corrected for it with fe cluster(conm)?
                Thank you!

                Comment


                • #9
                  I may be wrong, but I think the idea of correcting the fixed effects model using vce(cluster id) is exactly to correct your standard errors allowing for autocorrelation.

                  What I mean is, for panel data the post estimation tests will always tell you to reject H0 of no autocorrelation even after you corrected it. But this result doesn't have any meaning, as you have already managed this issue using vce(cluster id).

                  Comment


                  • #10
                    Christian:
                    I share Bertha's standpoint.
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #11
                      Ok thank you for the answers!
                      Just to summarize: These are the assumptions underlying regressions models:

                      1. var (e(it))=o^2 homoscedasiticity
                      Controlled for by using robust()-option.

                      2.cov(e(it) e(is)=0 no autocorrelation
                      Controlled for by using robust()-option

                      3.e(it)=normally distributed (normally distributed residuals)
                      Can I check for this with the following command:
                      xtreg capx_at_w Tobin_Q_w cashflow_w leverage_w che_w, fe cluster (conm)
                      predict residuals, e
                      kdensity residuals, normal

                      4. No multicollinearity
                      How to check for this? "Estat vif" command does not work.

                      5.E(e(it)=0 Expected value of erro e is zero

                      How to check for this?

                      6. cov (e(it), x(kit))=0 exogenity of independent varialbe
                      How to check for this?

                      7. Linear model
                      How to check if linear model is appropriate?

                      If finally all these assumptions are fulfilled I assume that the model is appropriate.

                      Thank you for your help!



                      Comment


                      • #12
                        Christian:
                        - # 5:
                        Code:
                        predict e_res, e
                        kdensity e_res
                        :

                        - ##4 and 6: -estat vce-; -estat vce, corr-;

                        #7: you may want to include a squared terms and see what happens.
                        Kind regards,
                        Carlo
                        (Stata 19.0)

                        Comment


                        • #13
                          Thank you Carlo!
                          I have got anohter question:
                          1. In a regression analysis is it necessrary that all the variables are normally disributed? Or is it just the residuals of the regression which have to be normally distributed?
                          Thank you for your answer!

                          Comment


                          • #14
                            Christian:
                            ...just the residuals of the regression have to be normally distributed...
                            Kind regards,
                            Carlo
                            (Stata 19.0)

                            Comment


                            • #15
                              Originally posted by Carlo Lazzaro View Post
                              Christian:
                              - # 5:
                              Code:
                              predict e_res, e
                              kdensity e_res
                              :

                              - ##4 and 6: -estat vce-; -estat vce, corr-;

                              #7: you may want to include a squared terms and see what happens.
                              Carlo, predict e_res, e is for the expected value or for the prediction of the idiosyncratic error component (http://www.stata.com/manuals13/xtxth...timation.pdf)? If so, what is the command for doing what Christian pretend to do? Must be "ue"?... Thanks
                              Last edited by Cláudio Carvalho; 15 Aug 2016, 09:30.

                              Comment

                              Working...
                              X