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
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
Comment