ECON734: Spatial Econometrics – Lab 1

Slides:



Advertisements
Similar presentations
The Marginal Utility of Income Richard Layard* Guy Mayraz* Steve Nickell** * CEP, London School of Economics ** Nuffield College, Oxford.
Advertisements

Econometric Analysis of Panel Data Panel Data Analysis: Extension –Generalized Random Effects Model Seemingly Unrelated Regression –Cross Section Correlation.
PANEL DATA 1. Dummy Variable Regression 2. LSDV Estimator
Front view of coach house (photographer facing west) Front view of coach house (facing north-west)Side view of coach house (facing south) Rear view of.
Econometric Analysis of Panel Data
1 General Structural Equation (LISREL) Models Week #2 Class #2.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 20P. 1Winter Quarter Propulsion Lab with MATLAB Lecture 20.
9.4 Linear programming and m x n Games: Simplex Method and the Dual Problem In this section, the process of solving 2 x 2 matrix games will be generalized.
SPATIAL DATA ANALYSIS Tony E. Smith University of Pennsylvania Point Pattern Analysis Spatial Regression Analysis Continuous Pattern Analysis.
Introduction to Applied Spatial Econometrics Attila Varga DIMETIC Pécs, July 3, 2009.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 19P. 1Winter Quarter MATLAB: Script and.
Meta-Analysis of Wetland Values: Modeling Spatial Dependencies Randall S. Rosenberger Oregon State University Meidan Bu Microsoft.
Brent D. Mast HUD. HUD currently has no administrative data to compare housing quality of public housing units to that of HCVP units. Census data allow.
More than just maps. A Toolkit for Spatial Analysis GUI access to the most frequently used tools ArcToolbox – an expandable collection of ready-to-use.
Econometric Analysis of Panel Data Dynamic Panel Data Analysis –First Difference Model –Instrumental Variables Method –Generalized Method of Moments –Arellano-Bond-Bover.
1 Econometrics 1 Lecture 1 Classical Linear Regression Analysis.
Arlington Police Department Crime Management Ron Andrews Blake Robinson Advisors: Bill Edmonds, Jim Mallard & Chief Bowman 1.
1 MF-852 Financial Econometrics Lecture 2 Matrix Operations in Econometrics, Optimization with Excel Roy J. Epstein Fall 2003.
SA basics Lack of independence for nearby obs
1 Econometrics 1 Lecture 20 Random Regressor and Large Sample Theory.
1 Econometrics 1 Lecture 6 Multiple Regression -tests.
Statistics 303 Chapter 10 Least Squares Regression Analysis.
Selected Problems from Chapter o.
Spatial Econometric Analysis Using GAUSS 1 Kuan-Pin Lin Portland State University.
Object-Oriented Programming (OOP). Implementing an OOD in Java Each class is stored in a separate file. All files must be stored in the same package.
Chapter 10 Lecture 2 Section: We analyzed paired data with the goal of determining whether there is a linear correlation between two variables.
Spatial Econometric Analysis Using GAUSS
1. TRANSPORT ECONOMICS Organization Course  Transportation Economics explores the efficient use of society’s scarce resources for the movement.
Final Project : 460 VALLEY CRIMES. Chontanat Suwan Geography 460 : Spatial Analysis Prof. Steven Graves, Ph.D.
All About Maps Beth Clause. How Firefighters Use Maps.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 20P. 1Winter Quarter Propulsion Lab with.
Lecture 3 (Chapter 4). Linear Models for Longitudinal Data Linear Regression Model (Review) Ordinary Least Squares (OLS) Maximum Likelihood Estimation.
Address matching also commonly called ‘geocoding’ Very common for: –Crime reports –Customer records –Tax/Parcel records –911 systems Most common form of.
Instructor: R. Makoto 1richard makoto UZ Econ313 Lecture notes.
S4 Training ModulesGeoDa: Spatial Regression 1 Spatial Structures in the Social Sciences Spatial Regression with GeoDa This lab includes discussion of.
Spatial Econometric Analysis 3 Kuan-Pin Lin Portland State University.
Spatial Econometric Analysis
REVIEW Linear Combinations Given vectors and given scalars
MATH 1046 Introduction to Systems of Linear Equations (Sections 2
ECONOMETRICS EC331 Prof. Burak Saltoglu
Econ 326 Lecture 19.
Luciano Gutierrez*, Maria Sassi**
Spatial Modeling Lee Rivers Mobley, Ph.D..
Principles of a Grid Reference
Kakhramon Yusupov June 15th, :30pm – 3:00pm Session 3
Linear Mixed Models in JMP Pro
Chapter 15 Panel Data Analysis.
The Least-Squares Regression Line
Charles University Charles University STAKAN III
ECON734: Spatial Econometrics – Lab 2
GIS Lecture: Spatial Joins
I271B Quantitative Methods
ANALYSIS SPATIAL DATA University of Pennsylvania
Geospatial Statistics
Spatial Econometric Analysis
Thatch House (Plan) Fig.4.
Migration and the Labour Market
مدلسازي تجربي – تخمين پارامتر
Spatial Econometric Analysis Using GAUSS
ECON734: Spatial Econometrics – Lab 5
ECON734: Spatial Econometrics – Lab 2
Biointelligence Laboratory, Seoul National University
ECON734: Spatial Econometrics – Lab 3
ECON734: Spatial Econometrics – Lab 4
COASTS.
Spatial Econometric Analysis
Linear Panel Data Models
Spatial Econometric Analysis
Site and Context. Section from East Section E2 Section E1 Sannidhanam Malikapuram Sannidhanam Malikapuram.
Signal and systems analyses for discriminating chronotoxicity classes based on selected circadian mRNA gene expressions in liver and colon mucosa. Signal.
Presentation transcript:

ECON734: Spatial Econometrics – Lab 1 Term I, 2018-2019 Yang Zhenlin zlyang@smu.edu.sg http://www.mysmu.edu/faculty/zlyang/

Neighborhood Crime Data In illustrating the applications of spatial cross-sectional models, Anselin (1988, p.187) used the neighborhood crime data corresponding to 49 contiguous neighborhood in Columbus, Ohio, in 1980. These neighborhood correspond to census tracts, or aggregates of a small number of census tracts, where Crime: the combined total of residential burglaries and vehicle thefts per thousand household in the neighborhood (the response variable). Income and House: the explanatory variables representing income and housing values in thousand dollars. East: a dummy variable indicates whether the `neighborhood' in the east or west of a main north-south transportation axis. In addition, the neighborhood centroid coordinates are also given, as well as the list of neighbors of each spatial unit (neighborhood) that gives a first-order contiguity spatial weight matrix. The model: Crime = 0 + 1Income + 2House + error + spatial

Neighborhood Crime Data The Data (columbus.dat): Crime Income House CCX CCY East 18.802 21.232 44.567 35.62 42.38 0 32.388 4.477 33.200 36.50 40.52 0 38.426 11.337 37.125 36.71 38.71 0 0.178 8.438 75.000 33.36 38.41 0 15.726 19.531 80.467 38.80 44.07 1 30.627 15.956 26.350 39.82 41.18 1 50.732 11.252 23.225 40.01 38.00 1 26.067 16.029 28.750 43.75 39.28 1 ⋮ The Spatial Weight Matrix W (wmat.dat): The spatial weight matrix for the crime data is the 1st order contiguity matrix, stored in sparse matrix format [i, j, s] = find(W), so that the Matlab statement, W = sparse(i,j,s), reconstructs the 4949 spatial weight matrix. W is already row-standardized.

Fitting crime data with SED model The generic m-function SED_ML.m, called by the main program Columbus_Qmle_SED.m, is for maximizing the concentrated log-likelihood function given in (8), Chap 2 lecture notes. It returns (Q)MLE of . function rhoh = SED_ML(y,x,W) rhoh = fminsearch(@FnSLDh2,0); function f = FnSLDh2(rhoh) n = length(y); In = eye(n); B = In  rhoh*W; By = B*y; Bx = B*x; beth = pinv(Bx'*Bx)*Bx'*By; eps = By  Bx*beth; sig2 = eps'*eps/n; f = .5*log(sig2)  log(det(B))/n; end

Fitting crime data with SED model The main m-file, Columbus_Qmle_SED.m: for QML estimation and inference for SED model, using the neighborhood crime data. load columbus.dat; n = length(columbus); y = columbus(:,1); x = [ones(n,1) columbus(:,2:3)]; ⋮ % Weight matrix load wmat.dat; W = sparse(wmat(:,1),wmat(:,2),wmat(:,3)); rhoh = ML_SED(y,x,W); % QMLE of  B = In  rhoh*W; By = B*y; Bx = B*x; beth = pinv(Bx'*Bx)*Bx'*By; % QMLE of  ur = By  Bx*beth; sig2 = ur'*ur/n; % QMLE of 2

Fitting crime data with SED model The results for QML estimation: (Q)MLE se_MLE t_MLE se_QMLE t_QMLE 0 59.8924 5.3662 11.1611 5.3662 11.1611 1 -0.9413 0.3306 -2.8477 0.3306 -2.8477 2 -0.3023 0.0905 -3.3407 0.0905 -3.3407  0.5618 0.1339 4.1963 0.1343 4.1835 2 95.5737 19.8735 4.8091 27.1596 3.5190 The results for OLS and GLS-GM estimation: OLSE t_OLSE GLS-GM t_GLS-GM 0 68.6189 3.0600 ? ? 1 -1.5973 -14.3073 ? ? 2 -0.2739 -25.7215 ? ?  ? ? 2 130.7577 ~ ? ?

Fitting crime data with SLD model The generic m-function SLD_ML.m, called by the main program Columbus_Qmle_SLD.m, is for maximizing the concentrated log-likelihood function given in (24), Chap 2 lecture notes, returning (Q)MLE of . Function lamh = SLD_ML(y,x,W) lamh = fminsearch(@FnSLDh2,0); function f = FnSLDh2(lamh) n = length(y); In = eye(n); A = In  lamh*W; Ay = A*y; xAy = x'*Ay; beth = pinv(x'*x)*xAy; eps = Ay  x*beth; sig2 = eps'*eps/n; f = .5*log(sig2)  log(det(A))/n; end

Fitting crime data with SLD model The main m-file, Columbus_Qmle_SED.m: for QML estimation and inference for SED model, using the neighborhood crime data. load columbus.dat; n = length(columbus); y = columbus(:,1); x = [ones(n,1) columbus(:,2:3)]; ⋮ % Weight matrix load wmat.dat; W = sparse(wmat(:,1),wmat(:,2),wmat(:,3)); rhoh = ML_SED(y,x,W); % QMLE of  B = In  rhoh*W; By = B*y; Bx = B*x; beth = pinv(Bx'*Bx)*Bx'*By; % QMLE of  ur = By  Bx*beth; sig2 = ur'*ur/n; % QMLE of 2

Fitting crime data with SLD model The results for QML estimation: (Q)MLE se_MLE t_MLE se_QMLE t_QMLE 0 45.0781 7.1773 6.2807 7.1633 6.2929 1 -1.0316 0.3051 -3.3806 0.3042 -3.3909 2 -0.2659 0.0885 -3.0049 0.0885 -3.0049  0.4310 0.1177 3.6629 0.1182 3.6453 2 95.4875 19.4864 4.9002 30.5713 3.1234 The results for OLS and GMM estimation: OLSE se_OLSE t_OLSE GMM se_GMM t_GMM 0 38.1810 84.9013 4.1437 1 -0.8658 0.1263 -2.4362 2 -0.2636 0.0083 -2.8853  0.5573 0.0226 3.7090 2 102.3684 ~

Fitting crime data with SLE model The generic m-function SLE_ML.m, called by the main program Columbus_Qmle_SLE.m, is for maximizing the concentrated log-likelihood function given in (39), Chap 2 lecture notes, returning (Q)MLE of . function spa = SLE_ML(y,x,W) spa = fminsearch(@FnSLDh2,[0,0]); function f = FnSLDh2(spa) n = length(y); In = eye(n); A = In  spa(1)*W; B = In  spa(2)*W; Bx = B*x; beth = pinv(Bx'*Bx)* Bx'* B*A*y; eps = B*A*y  Bx*beth; sig2 = eps'*eps/n; f = .5*log(sig2)  log(det(A))/n  log(det(B))/n; end

Fitting crime data with SLE model In the main program Columbus_Qmle_SLE.m , the key commands are: spah = SLE_ML(y,x,W); % QMLE of lambda and rho A = In  spah(1)*W; B = In  spah(2)*W; The results for QML estimation: (Q)MLE se_MLE t_MLE se_QMLE t_QMLE 0 47.7796 9.9011 4.8257 9.9112 4.8208 1 -1.0258 0.3263 -3.1437 0.3257 -3.1495 2 -0.2816 0.0900 -3.1283 0.0900 -3.1282 2 95.5976 19.4737 4.9091 30.1696 3.1687  0.3681 0.1966 1.8725 0.1975 1.8635  0.1666 0.2966 0.5616 0.2968 0.5612