Hi Stata expert,
Currently, I am studying Spatial Panel Data. I am currently having trouble with the command I use about Spatial Panel Data. I have read papers and blogs, but my problem is not resolved. Can you advise on my work? I will be happy to provide the data and do-files I have been working on.
command for -xtdescribe- cannot be executed. I tried to get rid of it, it worked finally.
Then -regress $ylist $xlist- cannot be executed. I tried to add xtreg $ylist $xlist, fe- it can be run.
But when it will be tested for model selection it can't. Looks like the command I wrote is wrong. The correct command for -xsmle- is how?
This is where I tested the spatial panel data for the provincial level in Indonesia. Thank you.
clear all
set more off
use F:\spatial\coordinate.dta, clear
spmat idistance W_weights latitude longitude, id(id) normalize(row)
spmat summarize W_weights
spmat summarize W_weights, links
spmat summarize W_weights, links detail
use F:\spatial\data.dta, clear
global id year
global t year
global ylist tb
global xlist aids hiv ttb doctor nurse phc hospital hs grdpt grdpb population density insurance poverty precipitations rainy temperature humidity wind atmospheric sunshine forest slum ffs pfs beef chicken eggs tofu tempeh
* Set data as panel data
sort $id $year
xtset $id $year
xtdescribe
xtsum $id $year $ylist $xlist
* Pooled OLS estimator
regress $ylist $xlist
//estat ic -> AkaikeÓ³ information criterion (AIC) and the Bayesian information criterion (BIC)
estat ic
//Spatial Durbin Model model (SDM)
//SDM with random-effects
xsmle tb aids aids hiv ttb doctor nurse phc hospital hs grdpt grdpb population density insurance poverty precipitations rainy temperature humidity wind atmospheric sunshine forest slum ffs pfs beef chicken eggs tofu tempeh, wmat(W_weights) model(sdm) re vce(cluster id) nolog
estat ic
0 Response to Spatial panel data for provincial level
Post a Comment