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
Count number of alive children within householdI am trying to compare different variables for different observations within a group - and I am not …
How do I draw two samples from dataset?I am drawing a random sample (1/3) form a data set to predict an outcome variable using a probit reg…
how to generate an age variable that is not statichello, Please may you help me with this. How do you generate a date variable that is non static. I …
Tables with multiple panelsHello, I want to make a table with two or more panels containing results for different models (atta…
OVTEST interpretationDear Statalist, I ran my regression reg ln_trade contig comlang comcol rta intl ln_dist Thereafte…
Subscribe to:
Post Comments (Atom)
0 Response to Spatial panel data for provincial level
Post a Comment