Announcement

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

  • Errors when running xtabond2 on stata 18

    I am attempting a two step gmm analysis using xtabond2, I keep recieving an "unbalanced parentheses" error message when the syntax seems to be correct
    here is the code I am using

    . xi: xtabond2 roa (L.roa = L.boardsize) i.comp_id (fy2016 fy2017 fy2018 fy2019) boardsize totalassets totaldebt age pibm ceodual supermajority, gmm(roa totalassets totaldebt age pibm, lag(1 2) collapse) iv(fy2016 fy2017 fy2018 fy2019) twostep robust

    I have four time periods in the panel data, comp_id is the panel variable, fy2016-2019 are year dummies, roa is my outcome variable and boardsize is my independent variable of interest, I want to use these year dummies and one level lagged versions of roa and boardsize as instruments. the remaining variables (totalassets totaldebt age pibm ceodual supermajority) are controls/other independent variables.

    ive arrived at gmm after attempting a fixed effects approach (xtreg) and a 2sls approach (xtivreg), determining that fixed effects does not account for simultaneous endogeniety (of roa and boardsize) and the instrument used in the 2sls approach (free cash flow) is not exogenous to the errors

    I dont understand why I continually get an unbalanced parentheses error, all of the variables used are numeric or encoded as such. Could there be other issues with syntax or dataset structure i am missing? I really need this thing to run.

  • #2
    The "(fy2016 fy2017 fy2018 fy2019)" is nonstandard syntax. For example, if you do "ivregress 2sls a (b=c) e (f g h) j k" you'll also get an error. Just do "fy2016 fy2017 fy2018 fy2019". Or if your purpose is to apply a time series or factor variable operator, you can do something like "i.(fy2016 fy2017 fy2018 fy2019)" or "L.(fy2016 fy2017 fy2018 fy2019)".

    Comment

    Working...
    X