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
Related Posts with Spatial panel data for provincial level
replacing "X" character within a string variable with "9"Hi, I have a string variable that some of its values consist of a combination of numbers and "X" (e.…
Question on looping over files in a directory using local and foreachDear Statalists, Recently I am attempting to deal with some .dta files in a local directory on the …
Reshaping the Bruegel DatasetGood Day! I am currently trying to reshape the Bruegel Dataset. Currently it is comprised of a year…
Labels at scatter plotDear All, I am always fascinated seeing how much useful information can be derived from even the si…
Double - robust regression estimator in StataHi all - I am applying the command from Emsley, Lunt, Pickle and Dunn (The State Journal 2018 https…
Subscribe to:
Post Comments (Atom)
0 Response to Spatial panel data for provincial level
Post a Comment