Announcement

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

  • Sebastian Kripfganz
    replied
    I am afraid your panel is not balanced. The regression output states that you have between 1 and 3 observations per company - on average about 2. With a maximum of 3 observations per group it is not possible to calculate the AR(2) test statistic. You need a minimum of 4 time periods.

    Note that the xtset command might tell you that your panel is "strongly balanced". However, this only means that you have for each company and year a respective row in your data set. It does not check whether there are any missing values. Those missing values in some of your variables turn the estimation sample unbalanced.

    Leave a comment:


  • Jains Chacko
    replied
    Hi Sir,

    I am working on predicting the firm-level optimum level of investment. In the estimation, I have the model developed by Richardson (2006) which is expressed as an investment as a function of one year lagged values of investment, explanatory variables and control variables. I tried using the following command in Stata.

    Code:
    xtdpdgmm L(0/1).loginvest l1.tobinsq l1.streturn l1.cash l1.logta l1.age l1.lev, noserial gmm(L1.loginvest, collapse model(difference)) iv(l1.tobinsq l1.streturn l1.cash l1.logta l1.age, difference model(difference)) twostep vce(cluster co_id)
    Postestimaation
    Code:
    estat serial
    estat overid
    Output
    Code:
    Generalized method of moments estimation
    
    Fitting full model:
    
    Step 1:
    initial:       f(b) =   60.63222
    alternative:   f(b) =  50.099668
    rescale:       f(b) =  4.5306529
    Iteration 0:   f(b) =  4.5306529  
    Iteration 1:   f(b) =  .88650032  
    Iteration 2:   f(b) =  .00834241  
    Iteration 3:   f(b) =  .00348571  
    Iteration 4:   f(b) =  .00347453  
    Iteration 5:   f(b) =  .00347453  
    
    Step 2:
    Iteration 0:   f(b) =  .00273063  
    Iteration 1:   f(b) =    .002638  
    Iteration 2:   f(b) =    .002638  
    
    Group variable: co_id                        Number of obs         =      1717
    Time variable: year                          Number of groups      =       855
    
    Moment conditions:     linear =       9      Obs per group:    min =         1
                        nonlinear =       1                        avg =  2.008187
                            total =      10                        max =         3
    
                                    (Std. Err. adjusted for 855 clusters in co_id)
    ------------------------------------------------------------------------------
                 |              WC-Robust
       loginvest |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
       loginvest |
             L1. |   .3550268   .1388608     2.56   0.011     .0828647     .627189
                 |
         tobinsq |
             L1. |  -.0089324   .0571256    -0.16   0.876    -.1208965    .1030317
                 |
        streturn |
             L1. |   .0912456   .1086676     0.84   0.401    -.1217391    .3042302
                 |
            cash |
             L1. |  -5.99e-07   9.15e-06    -0.07   0.948    -.0000185    .0000173
                 |
           logta |
             L1. |   .4958169   .6708675     0.74   0.460    -.8190593    1.810693
                 |
             age |
             L1. |  -.2694499   .0745122    -3.62   0.000    -.4154912   -.1234086
                 |
             lev |
             L1. |  -20.92443   9.509304    -2.20   0.028    -39.56233   -2.286541
                 |
           _cons |   11.72433   4.518156     2.59   0.009      2.86891    20.57976
    ------------------------------------------------------------------------------
    Instruments corresponding to the linear moment conditions:
     1, model(diff):
       L1.L.loginvest L2.L.loginvest L3.L.loginvest
     2, model(diff):
       D.L.tobinsq D.L.streturn D.L.cash D.L.logta D.L.age
     3, model(level):
       _cons
    
    .
    . estat serial
    
    Arellano-Bond test for autocorrelation of the first-differenced residuals
    H0: no autocorrelation of order 1:     z =   -3.2873   Prob > |z|  =    0.0010
    H0: no autocorrelation of order 2:     z =         .   Prob > |z|  =         .
    
    . estat overid
    
    Sargan-Hansen test of the overidentifying restrictions
    H0: overidentifying restrictions are valid
    
    2-step moment functions, 2-step weighting matrix       chi2(2)     =    2.2555
                                                           Prob > chi2 =    0.3238
    
    2-step moment functions, 3-step weighting matrix       chi2(2)     =    2.2374
                                                           Prob > chi2 =    0.3267
    I ran this code on a panel with five years of data (strongly balanced). The post-estimation Arellano-Bond test of order 2 is not available. I request you to confirm the correctness of the code used.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    1. Did you specify the overid option in the xtdpdgmm command line? This is required for running the incremental overidentification tests.
    2. These are the values of the quadratic GMM objective function. In a just-identified model, these values would be zero. In an overidentified model, we cannot satisfy the empirical moment conditions exactly but we minimize their weighted squared deviations. The values differ between step 1 and 2 because of the different weighting matrices. The numbers themselves are not informative.
    3. You can specify X3 either in an iv() or a gmm() option. The former is just a collapsed version of the latter. For strictly exogenous variables, all lags and leads are valid instruments. Thus, in principle, you could specify lag(. .). It is however common practice not to use leads, i.e. lag(0 .). To avoid a too-many-instruments problem, especially when the time dimension is not very small, you can further restrict the maximum lag length, e.g. lag(0 4). This guidance applies to the model(diff) instruments. For model(level), you would typically just specify lag(0 0) for exogenous variables.
    4. This depends on what you want to achieve. If you want to implement a system GMM estimator, you need to specify separate gmm() options for model(diff) and model(level). Given that you would start with different lags for predetermined and endogenous variables, you would typically also specify separate options for the two variables. For example:
      Code:
      gmm(X1, lag(1 .) model(diff)) gmm(X2, lag(2 .) model(diff)) gmm(X1, diff lag(0 0) model(level)) gmm(X2, diff lag(1 1) model(level))

    Leave a comment:


  • Prateek Bedi
    replied
    Dear Prof. Sebastian,

    I have the following queries regarding xtdpdgmm.

    1. The post-estimation command estat overid, diff is returning the following error when I run it after the main command i.e. xtdpdgmm. Although, I have used this post-estimation command many a times before, I do not understand the reason for this error.

    Code:
    . estat overid, diff
    requested action not valid after most recent estimation command
    r(321);
    Code:
    
    


    2. How do we interpret the following numbers we get at the start of the output?

    Code:
    Fitting full model:
    Step 1         f(b) =  .00305113
    Step 2         f(b) =   .9227573
    Code:
    
    


    3. If I have 3 explanatory variables in my model, say X1, X2 and X3 and I believe that X1 is predetermined, X2 is endogenous and X3 is exogenous, do I need to specify instruments for X3 in my command by opening the gmmiv brackets and specifying certain starting and ending lag lengths? If yes, what should these lag lengths be?

    4. For the predetermined and endogenous variables, X1 and X2, do I need to open two gmmiv brackets, one each with model(level) and model(diff) in my command?

    Thanks!

    Leave a comment:


  • Akbar Isayev
    replied
    Thank you very much for clarification.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    This discrepancy could indicate that the weighting matrix is not precisely estimated. This can happen if you have many instruments relative to the number of groups and/or if you have weak instruments. If you have not done this yet, try to reduce the number of instruments by curtailing the lags used as instruments and/or by collapsing the instruments.

    Alternatively, you could also try the iterated GMM estimator, option igmm instead of twostep, but it may not always converge in a reasonable number of steps if there are some underlying problems with the weighting matrix.

    If you only have a small number of groups, then there is sometimes not much that can be done. Estimating the weighting matrix precisely is then hardly possible and overidentification tests have only limited reliability in such a case.

    Leave a comment:


  • Akbar Isayev
    replied
    Dear Sebastian,

    I have a question to you related with "Sargan-Hansen test of the overidentifying restrictions" test. In case we get different results for 2-step weighting matrix and 3-step weighting matrix, can we rely on one of them? Particularly in my case Sargan-Hansen results for 2-step weighting matrix is 15.97 (p=0.314) whilst for 3-step weighting matrix it is 26.95 (p=0.019). Is it acceptable?

    Thank you in advance.

    Leave a comment:


  • Akbar Isayev
    replied
    It worked. Thank you very much. I was making a technical mistake. It is fine now.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    It should work in the same way with xtdpdgmm. Could you be more specific about what did not work, ideally by providing code and Stata output?

    Leave a comment:


  • Akbar Isayev
    replied
    Dear Sebastian,

    I have a question related with how to apply interaction term in xtdpdgmm syntax. In xtabond2, when I want to interact var1 with var2, I have to write it like c.var1##c.var2 inside the syntax. What about xtdpdgmm? I tried same kind but it didn't work. I will appreciate if you provide an answer for me.

    Thanks in advance.

    Have a nice day.

    Leave a comment:


  • Akbar Isayev
    replied
    Thank you very much dear Sebastian.

    Have a nice day.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    1. The nonlinear moment conditions that are added with option nl(noserial) are redundant if gmm(depvar, lag(2 .) model(diff)) and gmm(depvar, diff lag(1 1) model(level)) are also specified; see Blundell and Bond (1998, Journal of Econometrics, page 124). Strictly speaking, this redundancy only holds if there is no curtailing and no collapsing of the instruments, although I probably would not use this as an argument to add nonlinear moment conditions to a system GMM estimator. So, yes, in general there is no need for adding nonlinear moment conditions to a system GMM estimator that has lagged levels of the dependent variable as instruments for the first-differenced model and the first-differenced lagged dependent variable as an instrument for the level model.

    2. You do not necessarily have to add all of these instruments for the level model if you believe that some of them are not needed or not valid. You can still call it a "system GMM" estimator as long as you include some of them.

    Leave a comment:


  • Akbar Isayev
    replied
    Dear Sebastian Kripfganz,

    I have 2 questions related with xtdpdgmm:

    1) In your London Stata Conference slides there is a sentence: "These nonlinear moment conditions are redundant when added to the sys-GMM moment conditions (Blundell and Bond, 1998) but improve efficiency when added to the diff-GMM moment conditions" related with nonlinear moment conditions. Does this mean that using noserial option with system GMM is meaningless? In other words, while applying system GMM there is no need for adding nonlinear moment conditions. Am I correct?

    2) As I understand from the xtdpdgmm syntax, when you add differenced instruments for level form to the difference GMM syntax it becomes system GMM. And inside xtdpdgmm syntax, you have to categorize all variables that exist in main model as instruments (endogenous, predetermined and exogenous). For example:

    e endogen
    p predetermined
    s strictly exogenous

    xtdpdgmm L(0/1).depvar e p s, model(diff) collapse gmm(depvar, lag(2 .)) gmm(e, lag(2 .)) gmm(p, lag(1 .)) gmm(s, lag(0 .)) two vce(r) teffects nofooter

    Now my questions is: when you add differenced instruments for level form to go for system GMM, should we categorize all variables as instruments for level form? Or we can use some of them? In other words, can we add only lets say gmm(depvar e p, lag(1 1) m(l) diff) to the abovementioned syntax to make it system GMM or we have to add all variables like gmm(depvar e p, lag(1 1) m(l) diff) gmm(s, lag(0 0) m(l) diff) ?
    Just to make sure I am asking my question in a right way I put it in another way: Should we categorize all variables as differenced instruments for level form? or some of them will be enough in terms of syntaxing for system GMM?

    Thank you in advance

    Leave a comment:


  • Sebastian Kripfganz
    replied
    xtdpdgmm does not support constrained estimation, but testing linear restrictions after the estimation is possible:
    Code:
    test _b[x1] = 1
    or
    Code:
    test x1 = 1

    Leave a comment:


  • Jerry Kim
    replied
    Hi Dr. Kripfganz,

    Thank you for the effort on this package which does help researchers a lot. I have a small question regarding the constraint on coeffcients. Let's say if I wish to set a predetermined variable's coefficient to 1 as an additional constraint, does xtdpdgmm support the following kind of coding currently

    Code:
    constraint 1 x1 = 1
    Or maybe this type:

    Code:
    test _b1 = 1
    Thank you!

    Leave a comment:

Working...
X