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
How to perform an equivalence test (based on a t-test) for regression coefficients?Hi, How do I perform an equivalence test (based on a t-test) for regression coefficients in STATA? …
The problem with rcallThe package rcall is great! But when I start, I encounter a problem. When I transfor a scalar to R, …
ttest code multiple variables that define groupHello. I cant seem to work out the coding that replicates the following function, which when copied …
How to subset first row of each group?I have a dataframe of about 3 000 acquisition bids. Variables: Company ID (PERMNO) Bid ID (ID) Ann…
Generate all possible combinations of variablesDear all, I am looking for a way to generate all possible combinations of 10 variables, i.e. the su…
Subscribe to:
Post Comments (Atom)
0 Response to Spatial panel data for provincial level
Post a Comment