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
0 Response to no observations when using GMM xtabond2
Post a Comment