I am trying to use one-step system GMM in stata using xtabond2 but keep getting the error 'no observations' r(2000). I think this might be because I have some missing data in my panel but it is an unbalanced panel so shouldn't matter. my code so far is, thank you in advance for having a look.
clear all
set more off
capture log close
ssc install xtabond2
cd "C:\Users\bethc\OneDrive\Documents\Dissertation\da ta\dissertation"
insheet using "DATA.csv",names
generate lngdp = ln(gdp)
generate ginip = 100*gini
encode country, gen(country1)
generate growthp = growth*100
clear matrix
xtset country1 year
xtabond2 growth l.lngdp l.ginip l.fert l.femaleeduc l.maleeduc cpi i.year, gmm(lngdp, laglimits(2 3) eq(diff)) gmm(d.femaleeduc d.maleeduc d.ginip d.fert cpi, laglimits(1 1) eq(diff)) gmm(femaleeduc maleeduc fert, laglimits(1 1) eq(level)) gmm(cpi, laglimits(0 0) eq(level)) iv(i.year) h(2) noconstant robust
Related Posts with no observations when using GMM xtabond2
Function of the variable(s) in i() of a -reshape- especially when groupedI'm trying to understand how to interpret the i(varlist) in reshape when it is a grouped variable cr…
Control for age in Diff-in-diff regressionHi, I´m doing a difference-in-difference regression on the causal relationship between income tax a…
margins, dydx(x) at only certain values of xDear Statalisters, I am running a logit Code: svy, subpop(if marital==1&age>17&age<…
Question about data synchronizationDear all, Good morning. I have a question about the data synchronization. Please see the picture bel…
Creating "total number of births by sex", using dummies for sexDear All, I would like to create a variable for total number of male birth and total number of fema…
Subscribe to:
Post Comments (Atom)
0 Response to no observations when using GMM xtabond2
Post a Comment