Announcement

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

  • no observations when using GMM xtabond2

    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

  • #2
    Welcome to this forum. Are you able to run a conventional fixed-effects regression?
    Code:
    xtreg growth l.lngdp l.ginip l.fert l.femaleeduc l.maleeduc cpi i.year, fe
    Could you please show us the output of that regression. (Please see the FAQs on how to use CODE delimiters for formatting of code and output in this forum.)
    https://www.kripfganz.de/stata/

    Comment

    Working...
    X