Professional Documents
Culture Documents
Spatial Econometrics - 21 November 2019
Spatial Econometrics - 21 November 2019
Spatial Econometrics
Rusli Abdulah
Peneliti INDEF
Jakarta, 21-22 November 2019
What is Spatial Econometrics
“A collection of techniques that deal with the peculiarities caused by
space in the statistical analysis of regional science models”
Luc Anselin (1988)
Linear Regression
A brief Introduction to SAR models
• SAR models extend linear regression by allowing outcomes in one
area to be affected by
1. outcomes in nearby areas,
2. covariates from nearby areas, and
3. errors from nearby areas.
• Said in the spatial jargon, models can contain
1. spatial lags of the outcome variable,
2. spatial lags of covariates, and
3. spatially autoregressive errors
Preparing Data
Langkah 1 :Translate Shapefile to stata format
Unzip File ➔ ketik “unzip file name”
Tampilan
data
Langkah 2.1 : Membuka data “sp” format
Command “spset”
Langkah 3 : Create ID variable untuk digunakan
dengan data lain
Ketik ➔ “generate long fips = real(STATEFP + COUNTYFP)”
Command 2 : spset
Langkah 7 : Agregasi data analisis dengan data
shape file
Nama data file : texas_ue
Buka data : command ➔ “use texas_ue, clear”
Langkah 7 : Agregasi data analisis dengan data
shape file (lanjutan)
Command : “merge 1:1 fips using tl_2016_us_county”
Langkah 7 : Agregasi data analisis dengan data
shape file (lanjutan)
At this point, we type describe again and discover that texas ue.dta has lots of
unnecessary, leftover variables from tl 2016 us county.dta, so we drop them. There is
another variable that we rather like—the names of the counties—and we rename it
Command :
. rename NAME countyname
. drop STATEFP COUNTYFP COUNTYNS GEOID
. drop NAMELSAD LSAD CLASSFP MTFCC CSAFP
. drop CBSAFP METDIVFP FUNCSTAT
. drop ALAND AWATER INTPTLAT INTPTLON
. save, replace
Hasil merge data
Langkah 8 : Analisa data
Command : “describe”
Langkah 8 : Analisa data (lanjutan)
Command : “summarize unemployment”
Langkah 8 : Analisa data : membuat peta
Command : grmap unemployment