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