Announcement

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

  • xtabond2 : error with ivstyle option

    Hi all,

    While running a system GMM using xtabond2 , I came across the following error "invalid ivstyle". As I am quite new to xtabond2, I was hoping that someone could help me understand what's wrong with my code. I have unbalanced data of 48 countries and T=20.
    My dependent variable is : infant mortality
    My key independent variable is oda_gdp
    Other explanatory variables are : gdp_pc infl trade FDI publichealthexp gini schoolenroll fertilityrate governance.
    I consider all variables to be endogenous and include the time variable (year) as exogeneous.

    Here is my command:


    Code:
    xtabond2 log_infmort L1_log_infmort log_odagdp log_gdppc infl log_trade FDI log_healthexp log_gini log_schoolenroll log_fertilityrate governance i.year, gmmstyle (L1_log_infmort, lag(1 4) collapse) gmmstyle (log_odagdp log_gdppc infl log_trade FDI log_healthexp log_gini log_schoolenroll log_fertilityrate governance, lag(2 4) collapse), ivstyle(i.year, equation(level)) twostep robust small nodiffsargan

    However I get the following error message, not sure to understand why this message pops. Does this have anything to do with the fact that time dummies shoud be created manually?

    Code:
     " invalid 'ivstyle'
    I'm also having a hard time understanding what's the best way to determine the lag limit (a b) and when should we use the ivstyle option with equation(level) or with equation(diff).


    Thank you very much!




  • #2
    In Stata, all options come after a single comma. The command line above has a second comma, before ivstyle.


    Try:
    Code:
    xtabond2 log_infmort L1_log_infmort log_odagdp log_gdppc infl log_trade FDI log_healthexp log_gini log_schoolenroll log_fertilityrate governance i.year, gmmstyle(L1_log_infmort, lag(1 4) collapse) gmmstyle(log_odagdp log_gdppc infl log_trade FDI log_healthexp log_gini log_schoolenroll log_fertilityrate governance, lag(2 4) collapse) ivstyle(i.year, equation(level)) twostep robust small nodiffsargan

    Comment


    • #3
      Thanks a lot for your help David Roodman

      Comment


      • #4
        Hi David Roodman ,

        I'm facing another issue with my model. I have dropped 2 explanatory variables, have limited the lag range and made sure to add the collapse option but I still have too many instruments. Could you enlighten me on how to overcome this issue? Is dropping independant variables the only way to solve this problem ?

        Here is my code
        Code:
        xtabond2 log_infmort L1_log_infmort log_odagdp log_gdppc log_trade FDI log_healthexp log_gini log_fertilityrate governance i.year, gmmstyle(L1_log_infmort, lag(1 2) collapse) gmmstyle(log_odagdp log_gdppc log_trade FDI log_healthexp log_gini log_fertilityrate governance, lag(2 3) collapse) ivstyle(i.year, equation(both)) twostep robust small nodiffsargan orthogonal
        and here are the results
        Click image for larger version

Name:	sysgmmresults_1.png
Views:	1
Size:	21.1 KB
ID:	1755162

        Click image for larger version

Name:	sysgmmresults_2.png
Views:	1
Size:	69.2 KB
ID:	1755163

        Click image for larger version

Name:	SYS_3.png
Views:	1
Size:	62.3 KB
ID:	1755166

        Click image for larger version

Name:	SYS_4.png
Views:	1
Size:	31.7 KB
ID:	1755167

        Thank you in advance !

        Attached Files

        Comment


        • #5
          If you want to check for robustness to further contraction of the instrument set you can replace "lag(1 2)" and "lag(2 3)" with "lag(1 1)" and "lag(2 2)".

          Comment


          • #6
            Thank you David Roodman.

            All the coefficients except for the first lag of the dependent variable turned out insignificant. The number of instruments decreased after limiting the lag rage as you suggested , however the results stay insignificant. The settings N = 48 and T=20 seem to be adequate enough to be using the system GMM so I'm a bit confused on the insignificance of the results. The Hansen test says that the instruments are valid.
            When I use the fixed effects model, a few variables appeared to be significant.
            Could it be that there is something wrong with the model specifications or there is not much to do?

            Click image for larger version

Name:	gmm1.png
Views:	1
Size:	35.7 KB
ID:	1755685

            Click image for larger version

Name:	gmm2.png
Views:	1
Size:	54.1 KB
ID:	1755686

            Click image for larger version

Name:	gmm3.png
Views:	1
Size:	54.5 KB
ID:	1755687


            Thank you so much for your help !

            Comment

            Working...
            X