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
Screen dataI guess this is a simple question. This is a monthly dataset. Permno is an unique code for firms. …
Graph like this!Dear All, How can I can draw a graph like thisArray which can be found here https://stats.stackexcha…
compute mean of other observationsHi, Suppose I have the following observations. I would like to calculate the sales average for each…
Help with connecting variables based on id #'sHi All, I am working with a smaller dataset of approximately 500 observations in Stata 15.1. I am i…
structural equation of survival modelsHello, I know in STATA15, people could use gsem to deal with structural equation of survival models …
Subscribe to:
Post Comments (Atom)
0 Response to Problem with Hausman test in xsmle
Post a Comment