Announcement

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

  • #16
    Bootstrapping dynamic panel data estimators is a bit complicated because you need to ensure that the dynamic structure is retained in the bootstrap samples. I am afraid I have not looked into this matter yet and won't be able to assist with setting up the bootstrap command appropriately.

    If your cross-sectional sample size is large enough, Delta method standard errors obtained with nlcom should be reasonably accurate.
    https://www.kripfganz.de/stata/

    Comment


    • #17
      Hi Sir. I am using a dynamic panel data model and system GMM approach for model estimation. My model is as follows:


      R(i,t) = R(i,t-1) + R(i,t-1)^2 + FC(binary/dummy var) + Change in CSH(i,t) + Change in CSH(i,t-1) + FC*Change in CSH(i,t) + CSF(i,t) + CSF(i,t-1) + STI(i,t) + STI(i,t-1) + DBI(i,t) + DBI(i,t-1) + MTK(i,t) + SLG(i,t) + FMS + FA + TIMEEFFECTS + FIRMEFFECTS + ERROR TERM

      All variables are financial except FC, FMS & FA. Literature used lagged levels dated t-3 and t-4 as instruments for the regression in differences, and lagged differences dated t-2 for the regression in levels.

      My data is unbalanced panel data set. Observations are 3116 for approximately 325 firms over the period of 24 years i.e. N>t. A number of observations are missing for majority of firms (from beginning, middle and ending periods).

      To estimate DPD model, I am running following 2 step system GMM command:


      xtdpdgmm L(0/1).R(i,t) R(i,t-1)^2 CSH CSH_L1 CSF CSF_L1 STI STI_L1 DBI DBI_L1 m MTK SLG i.FC c.CSH#i.FC FMS FA, model(DIFF) collapse gmm(R_L1 CSH CSF STI DBI SLG MTK FMS, lag(2 5)) gmm(FA FC, lag(1 5)) gmm(R_L1 CSH CSF STI DBI SLG MTK FMS, lag(1 3) diff model(level)) gmm(FA FC, lag(0 1) diff model(level)) two vce(r)

      Can you please advise if model is correct? Using 4 lags leads to invalid results. Also, please advise on choice of instruments; shall I use iterated gmm command for that or predict ivreg? I am not getting on how to choose instruments as using same instruments as literature is giving insignificant result for most of variables and also resulting in unsatisfactory underidentification results.

      Also, as I mentioned I have missing period values from start, ending and middle so can I use Forward orthogonal GMM command with 2-step system GMM?

      Your kind response and feedback will be highly appreciated.

      Comment


      • #18
        If there are missing values, forward-orthogonal deviations retain more information and should thus be more efficient than first differencing.

        I cannot see any obvious problem with your model. Whether it is "correct", this would be a judgment you need to make yourself, possibly with the help of the conventional postestimation test statistics. Note that it is common practice to include time effects in the regression.

        The iterated GMM estimator reduces the finite-sample dependence on the initial weighting matrix. Asymptotically, iterated GMM and two-step GMM are equivalent.
        https://www.kripfganz.de/stata/

        Comment


        • #19
          Thank you Sebastian for your kind response. So, is this the right command for application of the forward orthogonal deviations?

          xtdpdgmm L(0/1).R(i,t) R(i,t-1)^2 CSH CSH_L1 CSF CSF_L1 STI STI_L1 DBI DBI_L1 MTK SLG i.FC c.CSH#i.FC FMS FA, model(FODEV) collapse gmm(CSH CSF STI MTK SLG i.FC FA c.CSH#i.FC , lag(2 5)) gmm(R_L1 R(i,t-1)^2 DBI FMS, lag(1 5)) gmm(CSH CSF STI MTK SLG i.FC FA c.CSH#i.FC , lag(1 1) diff model(level)) gmm(R_L1 R(i,t-1)^2 DBI FMS, lag(0 1) diff model(level)) TEFFECTS two vce(r)


          So, I have to run model(fodev) rather than model(diff) command while the rest of commands remain same for the DIFF MODEL(LEVEL) in 2-step system GMM. Also, can I use collapse function with FODEV? Can you please comment?

          Also, do I need to include interaction terms in the lags selection as Stata gives a signal of collinearity between these 2 terms with every outcome.

          "collinearity check...
          collinearities detected in [Y X] (right to left): 0o.FC#co.CSH
          collinearities detected in [Y X Z] (right to left): 0o.FC#co.CSH
          collinearities detected in [X Z Y] (right to left): 0o.FC#co.CSH
          warning: collinearities detected, reparameterization may be advisable

          Can you please advise on lag length selection?

          Results are severely affected by teffects. None of the significance value for time period is significant. Attached, I share the results while running above command:


          ------------------------------------------------------------------------------------------------
          Attached Files
          Last edited by Zeenat Murtaza; 12 Apr 2023, 03:58.

          Comment


          • #20
            Sebastian Kripfganz

            Dear sir,

            Regarding the same model as the rest of this thread, I am trying to analyse whether there are any significant global effects that influence the results (e.g. corona).
            I first started looking into tests for structural breaks and tried to use the xtbreak command. However, as Jan Ditzen explained in another thread:

            'dynamic models introduce the complexity that the different break segments are dependent on each other. Therefore the theory is excluding dynamic models. You can of course add the lag of the dependent variable, but the critical values will be incorrect. The non linearity in your case makes the problem more complex. Is there a way to rewrite the model in a static form or so that the coefficient of interest is captured by a single variable.'

            Now I looked at your London Stata Conference 2019 slides, and noted that I could include time dummies to account for global shocks. When including teffects into my model:

            1. How should I interpret the coefficients? I am not sure what these mean and how I could use it in my research.
            2. The last 7 years (T=14) are omitted because of collinearity. What does this mean exactly?

            At last, the model I had before including teffects was:

            Code:
            xtdpdgmm L(0/2).consumption L(0/2).(gas gdp) heatdays, model(diff) gmm(consumption, lag(2 .)) gmm(gas, lag(1 .)) gmm(gdp, lag(1 .)) two vce(r)
            which outputted results as expected. Also the results including teffects but WITHOUT two and vce(r), the results are very similar:

            Code:
            xtdpdgmm L(0/2).consumption L(0/2).(gas gdp) heatdays, model(diff) gmm(consumption, lag(2 .)) gmm(gas, lag(1 .)) gmm(gdp, lag(1 .)) teffects
            Now, including teffects together with two OR/AND vce(r), all coefficient estimates seem to be shifted upward (plus approximately 0.7). Do you have any clue why this could be? Am I missing something?

            Thanks in advance!

            Hein Willems

            Comment


            • #21
              1. You would not normally interpret the coefficients of the time dummies. These capture a variety of "global shocks" and time trends, and it is hard to give them a specific meaning. If a particular coefficient is very different from the others, this would suggest that something relevant has happened in that particular year.

              2. From the available information, I am afraid I am unable to tell why 14 dummies were omitted. Similarly, it is hard to say anything about why the coefficients changed in that particular way. Generally, you would expect the coefficients to change in time effects matter, because without them you would incur an omitted-variables bias.
              https://www.kripfganz.de/stata/

              Comment


              • #22
                Thank you Sebastian for your kind response. So, is this the right command for application of the forward orthogonal deviations?

                xtdpdgmm L(0/1).R(i,t) R(i,t-1)^2 CSH CSH_L1 CSF CSF_L1 STI STI_L1 DBI DBI_L1 MTK SLG i.FC c.CSH#i.FC FMS FA, model(FODEV) collapse gmm(CSH CSF STI MTK SLG i.FC FA c.CSH#i.FC , lag(2 5)) gmm(R_L1 R(i,t-1)^2 DBI FMS, lag(1 5)) gmm(CSH CSF STI MTK SLG i.FC FA c.CSH#i.FC , lag(1 1) diff model(level)) gmm(R_L1 R(i,t-1)^2 DBI FMS, lag(0 1) diff model(level)) TEFFECTS two vce(r)


                So, I have to run model(fodev) rather than model(diff) command while the rest of commands remain same for the DIFF MODEL(LEVEL) in 2-step system GMM. Also, can I use collapse function with FODEV? Can you please comment?

                Also, do I need to include interaction terms in the lags selection as Stata gives a signal of collinearity between these 2 terms with every outcome.

                "collinearity check...
                collinearities detected in [Y X] (right to left): 0o.FC#co.CSH
                collinearities detected in [Y X Z] (right to left): 0o.FC#co.CSH
                collinearities detected in [X Z Y] (right to left): 0o.FC#co.CSH
                warning: collinearities detected, reparameterization may be advisable

                Can you please advise on lag length selection?

                Results are severely affected by teffects. None of the significance value for time period is significant. Attached, I share the results while running above command:
                Attached Files

                Comment


                • #23
                  With forward-orthogonal deviations, you can start with a smaller lag order for the instruments than you would do with first differences. For endogenous variables, you could use lag(1 4) instead of lag(2 5), and for predetermined variables lag(0 4) instead of lag(1 5). Other than this lag adjustment, everything else can stay the same.

                  I cannot say much about the omitted interaction terms. If everything is fine, you may not have to worry about that. If you expect those terms not to be omitted, then you would need to think about why there could be collinearity; but that is not a problem specific to this model or estimator.

                  If all time dummies are highly insignificant, then it might be safe to omit them. But then it also should not affect much the other results if the rest of the specification is unchanged. You might want to check if there is high collinearity among the variables in your model.
                  https://www.kripfganz.de/stata/

                  Comment


                  • #24
                    Thank you so much Sebastian. I am truly humbled and obliged for your courteous, kind and expert response on all my queries. May God bless you infinite for helping everyone out. Thank you once again

                    Comment


                    • #25
                      Sebastian Kripfganz

                      Dear sir,

                      With regards to my research am not completely sure whether my method is valid since I do not completely understand one part about the estimation process.
                      In the 2019 slides it states: "When u_{it} is serially uncorrelated and homoskedastic, the optimal weighting matrix is independent of theta such that we can use the one-step instead of the two-step estimator."
                      What exactly does it mean for u_{it} to be either homoskedastic or heteroskedastic. As far as I thought up untill now, heteroskedasticity in the model was dealt with in the individual effects alpha_i.

                      Now with regard to my research, these are the steps I have taken:

                      - I have a panel dataset where N = 21.000 and T =13.
                      - My hypothesis is that different type of households react differently to a gas price increase regarding their energy consumption (price elasticity of demand).
                      - For this reason, I split the dataset of 21.000 units into 14 different datasets using clustering based on time-invariant variables.
                      - For these 14 different datasets I ran the first difference gmm estimation stated by xtdpdgmm.
                      - I used the results of the regressions to calculate a long-run and short-run price elasticity for these different subgroups which are my main results.

                      Could you maybe help me out on whether the discussion of homo/hetero-skedastic u_{it} influences the validity of this method and what it exactly means?


                      This is the model I apply for all 14 sub-datasets:

                      Code:
                      xtdpdgmm L(0/2).consumption L(0/2).gas L(0/2).gdp heatdays, model(diff) gmm(consumption, lag(2 5)) gmm(gas, lag(2 5)) gmm(gdp, lag(2 5)) iv(heatdays, lag(1 2)) two vce(r)
                      Since I have included vce(r) and two, I assumed my u_{it} is heteroskedastic, but to be honest, I am not really sure why I did that.


                      Thanks in advance!

                      Hein Willems

                      Comment


                      • #26
                        Homoskedasticity/heteroskedasticity is a property of the error variance. The individual effects contribute to the mean.
                        The first-step weighting matrix of the difference-GMM estimator is optimal if the error variance is constant over time and across individuals (homoskedasticity) and the covariances of the idiosyncratic error component are zero (again across time and individuals).

                        In any case, heteroskedasticity would only affect the efficiency of the estimator, not its consistency. The two-step estimator is asymptotically efficient irrespective of whether the errors are homoskedastic or heteroskedastic. You can say that the two-step estimator is robust to heteroskedasticity. In combination with option twostep, vce(robust) asks for the Windmeijer finite-sample variance correction, which is unrelated to the homoskedasticity/heteroskedasticity question. Even without option vce(robust), the two-step estimator and its standard errors would be robust to heteroskedasticity.

                        The one-step estimator would be inefficient (but still consistent) in the case of heteroskedasticity. Here, vce(robust) would be needed for standard errors robust to heteroskedasticity.

                        Admittedly, the implications of vce(robust) in these two cases can be a bit confusing. As a general rule, using vce(robust) hardly does any harm, while not using it might do.
                        https://www.kripfganz.de/stata/

                        Comment


                        • #27
                          Sebastian Kripfganz

                          Thanks a lot! This helps a lot for my technical understanding.
                          I do still have some problems with the intuition.
                          Since I am creating sub-datasets from my original dataset, I am actually imposing some kind of heterogeneity right? So would it be weird to assume heteroskedastic error terms in this case? Or is this not related..

                          Comment


                          • #28
                            The typical case for creating subsets is the assumption of some heterogeneity in the slope coefficients across subsets, but homogeneity within subsets. Heteroskedasticity (non-constant variance) is not usually a reason for creating subsets, because it is mainly an efficiency issue, but creating subsets reduces efficiency even more (because of fewer observations).

                            If you have reasons to assume that the heterogeneity across subsets is both in the slope coefficients and the variances, then of course you would kill two birds with one stone by creating subsets.
                            https://www.kripfganz.de/stata/

                            Comment


                            • #29
                              Sebastian Kripfganz

                              For my study I am using Windmeijer corrected standard errors. Today I realised that I might also need to adjust my standard errors for clustering (since different households might have correlations). Is this taken into account using vce(r)?

                              Kind regards,

                              Hein Willems

                              Comment


                              • #30
                                You can cluster standard errors in the usual way with the vce(cluster ) option, which still applies the Windmeijer correction for two-step estimators. vce(robust) clusters standard errors at the group level set by xtset.
                                https://www.kripfganz.de/stata/

                                Comment

                                Working...
                                X