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
Generating a dummy variable with value from other variable to a new row (cell)Hi, my job here is to generate a new variable (dummy for months unemployed) for December. In my anal…
I am confused about the confidence interval of survival analysis between two methodsIf I analyze a set of data use syntax ”ci means variate” and I get a result like this ci means y V…
Simulation of repeated measures data in a stepped-wedge contextHello, I have written the following code for a three-level repeated measures model in a stepped-wed…
Cubic splines to model relationships between continuous variables and outcomes: a guide for cliniciansFor those interested, I've just come across this interesting article, published on Bone Marrow Trans…
Color schemes and color palettes - setting default colors for graphsI have a list of colors from my workplace that we should use for all the graphs I create. Ideally I …
Subscribe to:
Post Comments (Atom)
0 Response to Spatial panel data for provincial level
Post a Comment