I was estimating spatial panel data models in STATA, when I tried to perform Hausman test, the following message appears:
... estimating fixed-effects model to perform Hausman test
_xsmle_hausman_ml(): 3200 conformability error
<istmt>: - function returned error
r(3200);
I'm a iniciant, someone know how to solve that?
Thats the code that i'm using
clear all
set more off
use C:\Users\aliss.LAPTOP-VERCCTIC\Desktop\weights.dta, clear
spmat dta W m*, normalize(row)
spmat summarize W
spmat summarize W, links
spmat summarize W, links detail
use C:\Users\aliss.LAPTOP-VERCCTIC\Desktop\paneldata2.dta, clear
global id ID2
global t YEAR
global ylist TX_MAMA
global xlist U_REF TX_ENV TX_URB PEST MED_ONCO
* Set data as panel data
sort $id $t
xtset $id $t
xtdescribe
xtsum $id $t $ylist $xlist
* Pooled OLS estimator
reg $ylist $xlist
//estat ic -> Akaike’s information criterion (AIC) and the Bayesian information criterion (BIC)
estat ic
//Spatial Durbin Model model (SDM)
//SDM with random-effects
xsmle TX_MAMA U_REF TX_ENV TX_URB PEST MED_ONCO, wmat(W) model(sdm) re vce(cluster ID2) nolog
estat ic
//SDM with spatial fixed-effects
xsmle TX_MAMA U_REF TX_ENV TX_URB PEST MED_ONCO, wmat(W) model(sdm) fe type(ind) vce(cluster ID2) nolog
//SDM with spatial fixed-effects [data transformed according to Lee and Yu (2010)]
xsmle TX_MAMA U_REF TX_ENV TX_URB PEST MED_ONCO, wmat(W) model(sdm) fe type(ind, leeyu) vce(cluster ID2) nolog
estat ic
//SDM with time fixed-effects
xsmle TX_MAMA U_REF TX_ENV TX_URB PEST MED_ONCO, wmat(W) model(sdm) fe type(time) vce(cluster ID2) nolog
estat ic
//SDM with spatial and time fixed-effects
xsmle TX_MAMA U_REF TX_ENV TX_URB PEST MED_ONCO, wmat(W) model(sdm) fe type(both) vce(cluster ID2) nolog
estat ic
//SDM without direct, indirect and total effects
xsmle TX_MAMA U_REF TX_ENV TX_URB PEST MED_ONCO, wmat(W) model(sdm) noeffects nolog
estat ic
//testing the appropriateness of a random-effects variant using the Robust Hausman test
//(example: if Prob>=chi2 = 0.0000 -> p-value lower than one percent -> we strongly reject the null hypothesis -> use fixed-effects)
//SDM Hausman test
xsmle TX_MAMA U_REF TX_ENV TX_URB PEST MED_ONCO, wmat(W) model(sdm) hausman nolog
Here, in the last line above is where the problem happend
Related Posts with Problem with Hausman test in xsmle
Use of Change in variables instead of Levels of variables in Fixed effects regressionDear Stata members I would like to ask the community to share their thoughts on using levels instea…
STATA command to make the PSTR and PSTAR models.Hello I am a Master's student in economics and I would like you to help me with the STATA command to…
mlogit: change y = 0.5 to other options if opt-out is selectedHi All, My dependent variable has three options: "No preference", "Prefer A", "Prefer B". I would l…
Smoothed plot using margins, marginsplotHi there! Does anyone know how to smooth a plot using margins and marginsplot? I ran the following…
Kernel matching - propensity scoresHi I have a few questions regarding Propensity Scores Matching with Kernel Matching. 1) If there ar…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with Hausman test in xsmle
Post a Comment