Announcement

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

  • Sebastian Kripfganz
    replied
    If all overidentifying restrictions are indeed valid, in repeated random samples you would expect to see a more extreme value of the Hansen test in 15% of the cases, provided that the Hansen test is correctly sized.

    The latter qualification can be an issue with dynamic panel data models, in particular if you have a relatively small sample size and many instruments, or if some of the instruments are weak. There is no consensus on what constitutes a good range of p-values that provides us with sufficient confidence in the correct model specification. See for example the following article:

    Leave a comment:


  • John Sgr
    replied
    Dear Sebastian,

    What is the best way to judge p-values of Hansen J-test of the overidentifying restrictions? I found p value=0.15, how should I interpret this?

    Best regards,
    John


    Leave a comment:


  • Sebastian Kripfganz
    replied
    (i) The differences in the coefficients of the year dummies are possibly due to the different instrumentation. Note that the iv() option with xtabond2 automatically first-differences the year dummy instruments, while the same option with xtdpdgmm would require the suboption diff to do the first-differencing of the instruments. The coefficients might also differ if xtabond2 drops a different year dummy due to collinearity than xtdpdgmm does.

    (ii) The differences in the year dummy coefficients could possibly contribute to the differences in the test results. More importantly, it is actually a feature of xtdpdgmm that it produces different AR test results after the two-step estimator with the Windmeijer correction. Let me quote myself from the opening post of this thread:
    Originally posted by Sebastian Kripfganz View Post
    The results of the Arellano-Bond test differ slightly from xtdpd and xtabond2 for two-step robust estimators because I account for the finite-sample Windmeijer (2005) correction when computing the test statistic, while the existing commands do not.
    You should get the same test results with the one-step estimator, or with the two-step estimator but without the robust/vce(robust) options.

    Leave a comment:


  • Tiyo Ardiyono
    replied
    Dear Sebastian,

    Thank you for the update.

    Now my problem is the difference result from using XTABOND2 and XTDPDGMM. So, I compare the commands:
    Code:
    global var1 ="hf hfhf lgdp lgdp2 L(0/1).(hflgdp)"
    
    xtabond2 L(0/1).ls_fdi $var1 yr2004-yr2015, gmm(ls_fdi, lag(2 3) coll) gmm(hf, lag(2 5) coll) gmm(hfhf, lag(2 5) coll) gmm(hflgdp, lag(2 5) coll) gmm(lgdp, lag(2 5) coll) gmm(lgdp2, lag(2 5) coll) iv(yr2004-yr2015) artest(10) noleveleq twostep svmat robust
    
    xtdpdgmm L(0/1).ls_fdi $var1 yr2004-yr2015, gmm(ls_fdi, lag(2 3) coll) gmm(hf, lag(2 5) coll) gmm(hfhf, lag(2 5) coll) gmm(hflgdp, lag(2 5) coll) gmm(lgdp, lag(2 5) coll) gmm(lgdp2, lag(2 5) coll) iv(yr2004-yr2015) model(diff) twostep overid vce(robust)
    The estimates for the endogenous variables are the same (both coefficients and the standard error), but there are differences in (i) the estimates for year dummies and (ii) the AR1, AR2, and so on. I'd say I can ignore the difference in (i) but the difference in (ii) is significant.
    xtabond2 produces
    Code:
    ------------------------------------------------------------------------------
    Arellano-Bond test for AR(1) in first differences: z =  -4.09  Pr > z =  0.000
    Arellano-Bond test for AR(2) in first differences: z =  -0.16  Pr > z =  0.871
    Arellano-Bond test for AR(3) in first differences: z =   0.49  Pr > z =  0.625
    Arellano-Bond test for AR(4) in first differences: z =   0.17  Pr > z =  0.868
    Arellano-Bond test for AR(5) in first differences: z =   0.09  Pr > z =  0.927
    Arellano-Bond test for AR(6) in first differences: z =   0.50  Pr > z =  0.616
    Arellano-Bond test for AR(7) in first differences: z =  -0.17  Pr > z =  0.862
    Arellano-Bond test for AR(8) in first differences: z =   0.09  Pr > z =  0.925
    Arellano-Bond test for AR(9) in first differences: z =  -0.31  Pr > z =  0.755
    Arellano-Bond test for AR(10) in first differences:z =   0.28  Pr > z =  0.776
    ------------------------------------------------------------------------------
    XTDPDGMM produces
    Code:
    Arellano-Bond test for    autocorrelation    of the first-differenced residuals
    H0: no autocorrelation    of order 1:    z =   -0.0179   Prob > z  =    0.9857
    H0: no autocorrelation    of order 2:    z =   -0.0023   Prob > z  =    0.9982
    H0: no autocorrelation    of order 3:    z =    0.0046   Prob > z  =    0.9964
    H0: no autocorrelation    of order 4:    z =    0.0064   Prob > z  =    0.9949
    H0: no autocorrelation    of order 5:    z =    0.0011   Prob > z  =    0.9991
    H0: no autocorrelation    of order 6:    z =    0.0090   Prob > z  =    0.9928
    H0: no autocorrelation    of order 7:    z =         .   Prob > z  =         .
    H0: no autocorrelation    of order 8:    z =         .   Prob > z  =         .
    H0: no autocorrelation    of order 9:    z =         .   Prob > z  =         .
    H0: no autocorrelation    of order 10:    z =    0.0029   Prob > z  =    0.9977
    What does the cause of the difference and how can I get the same result using both xtabond2 and xtdpdgmm? The Hansen in both commands are the same though.
    Last edited by Tiyo Ardiyono; 17 Mar 2021, 21:04.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Thanks for flagging this bug. There was unfortunately a silly mistake I did in my last update.

    The updated version 2.3.3 that fixes this problem is now available on my website:
    Code:
    adoupdate xtdpdgmm, update

    Leave a comment:


  • Tiyo Ardiyono
    replied
    Dear Sebastian,

    When working with a new computer and a new Stata installation (16.1), I found an error when running code:
    Code:
    estat mmsc model1 model2
    There is an error:
    ngroups1 not found
    I usually use Stata in my own laptop, and the code works just fine.
    What do you think the problem in here?

    Thank you.

    Leave a comment:


  • Dao DinhNguyen
    replied
    Thank you so much for your reply.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    1. The condition T>=2 refers to a model where the initial observation is observed for period 0, i.e. effectively you need at least 3 time periods when the first-differenced lagged dependent variable is instrumented with the second lag of the dependent variable in levels.

    2. Almost everything you can do with xtabond2, you can also do with xtdpdgmm. Instrumenting for endogenous variables with the latter command works in a very similar way. Please see the help file or my 2019 London Stata Conference presentation:
    3. With a binary dependent variable, you can still estimate a linear regression model. This is then labelled a linear probability model. Again, no difference between xtabond2 and xtdpdgmm here.

    Leave a comment:


  • Dao DinhNguyen
    replied
    Dear Sebastian Kripfganz

    My name is Dinh, from Vietnam. Currently, I am doing a research related to the health effect of housing. My data is panel data with 5 waves and round 1900 observations of each wave.
    The estimated model is constructed as follow:
    Hi,t= b0*Hi,t-1+b0*Housingi,t+Xi,t*alpha+error term.
    I also read your interesting paper (https://onlinelibrary-wiley-com.ezpr....1002/jae.2681). But I am still stuck with my data. Could I have some questions:
    1. As you mentioned in your paper, T > =2, so is it ok to estimate the model by your command with T=3? I know that we need at least 5 years for xtabond2 if running two-step GMM.
    2. In your paper, the second assumption is that X (like my function include vector X and Housing) is strictly exogenous. However, I am arguing that Housing condition is endogenous. If using xtabond2, I can add it into (gmm(H Housing, lag (2 3) collapse)). So I cannot use your command if I hold my assumption of endogenous housing?
    3. Your command is only to use for linear dependent variable? No for binary variable? I also think xtabond2 is only for linear dependent variable. But I did read a paper using xtabond2 with binary dependent.

    Thank you in advance, and I hope you all the best!
    Dinh

    Leave a comment:


  • Raymond Zhang
    replied
    @Sebastian Kripfganz I have recieved your email.Thank you very much.


    Best Regards.
    Raymond

    Leave a comment:


  • Sebastian Kripfganz
    replied
    If you are located in China, there might be firewall restrictions that prevent you from installing Stata packages directly from my website. As the new version is not yet available on SSC, I have just sent you the source files for a local installation by e-mail.

    Leave a comment:


  • Raymond Zhang
    replied
    Dear sebastian Kripfganz,I have tried to update xtdpdgmm from http://www.kripfganz.de/stata/.But I failed to update it.I have sent en email to you.Can you send me the updated adofile and helpfile ?Thanks in advance.



    Best.
    Raymond

    Leave a comment:


  • Sebastian Kripfganz
    replied
    There is a new update to version 2.3.2 now available on my personal website:
    Code:
    net install xtdpdgmm, from(http://www.kripfganz.de/stata/) replace
    This update fixes an annoying bug that produced an error message when the command was run with the nl(noserial) option on a data set in which the panel identifier was named different than "id". (Apparently, all of my test data sets had a panel identifier variable named "id" which is why I never noticed this bug.) Many thanks to Luca Uberti for flagging this problem.

    I used this opportunity to add another option to the estat mmsc postestimation command. The penalty term for the BIC and HQIC versions of the model and moment selection criteria depend on a measure of the sample size, ln(N) and ln(ln(N)), respectively. So far, for N the command always used the number of groups (panels). Now, there is a new option that allows to choose N either as the number of groups, n(groups), the number of clusters, n(cluster), or the total number of observations, n(obs).
    If the xtdpdgmm command was run with the vce(cluster) option, the default for estat mmsc is now to use the number of clusters for N. Otherwise, it remains the number of groups. (There is actually a related issue with the conventional BIC after other estimation commands; see help bic note.)

    Leave a comment:


  • Nadir Ismayilov
    replied
    Dear Sebastian,

    I need your help regarding the model. ROA,𝑖𝑑= 𝛼ROA𝑖 + πœ‘ROAπ‘–π‘‘βˆ’1 + βˆ‘ Ξ΄ROA_sic_t SIC_Year sic_t+ Ξ΅ROA,𝑖𝑑;

    where:
    1)SIC_Year sic_t is the year-specific industry fixed effect.
    2)Coefficient 𝛼ROA𝑖 is the firm-specific constant
    3)πœ‘s are the first-order autoregressive coefficient estimates.

    I have used XTABOND command as follows.

    . xtabond ROA year2011-year2019 fyear

    fyear is time variable in my dataset. It is unbalaced panel data. Gvkey are firm name codes, SIC variable is industry level codes.

    Click image for larger version

Name:	s.png
Views:	3
Size:	24.8 KB
ID:	1586636


    In the studies it is written: "We use the deviations of the actual values from the forecasts (i.e., forecast errors) as the measure of abnormal profitability (aROAit) to find firms with greater-than-normal profitability (aROAit>0)"

    How would you find forecast and their deviations from actual values? I tried to do it with the forecasting of Stata but as it is unbalanced panel data I receive error each time. With the predict comman I get some big numbers each time, so I am wondering if my Xtabond command was correct and if it was same as in study(not sure if I correctly do it with SIC codes)?

    How would you do it with forecast?

    Best Regards,
    Nadir

    Leave a comment:


  • Lin Liu
    replied
    That's great. Thank you.

    Leave a comment:

Working...
X