Announcement

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

  • Hausman fixed effects insufficient observations error

    Good morning,
    For a class project we have to use panel data to analyze the effects of a policy. We are asked to do so using Hausman to see if we need to use the fixed effects or random effects model. The process I did was this:
    global id consecutivo_c
    global t Ola
    global ylist Indice_pobreza
    global xlist hogaricbf guarderia preescolar1 primaria secundaria salud cortesagua consumoagua transporte pandillas1 prostibulos duermencalles desplazados vias_barrio amenaza_gra seguridad barrio_legal
    sort $id $t
    xtset $id $t
    which worked fine, but then to apply the hausman test I was asked to do this process:
    quietly xtreg $ylist $xlist, fe
    estimates store fixed
    quietly xtreg $ylist $xlist, re
    estimates store random
    hausman fixed random
    After the first line (quietly xtreg $ylist $xlist, fe) it appears that I have error of insufficient observations. It is worth noting that the panel data is only of two periods (year 2010 and year 2013), but there are a lot of observations (around 1030). Does anyone know why this problem might appear? Thank you very much

  • #2
    Ana:
    welcome to the list.
    Have you checked for the presence of missing data in your variables?
    If not, see -help misstable-.
    As an aside, In would remove quietly and see what's the matter with your panel data regession.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment

    Working...
    X