Unformatted text preview:

ESE 502 Tony E. Smith ASSIGNMENT 7 This final study is a continuation of the analysis in Assignment 6, and will use the results of that analysis. It is assumed that you have constructed the shapefile, Final_Tracts.shp, in ARCMAP, and also the MATLAB workspace Phil_Housing.mat. Here you will carry out spatial regressions that take account of the spatial autocorrelation found in the OLS residuals when regressing the log of Median Housing Value (lnMV) on Percent Housing Vacancy (%Vac) and Percent NonWhite (%NW). First open ARCMAP, and create a blank map document. Now add Final_Tracts.shp to this document and, for convenience, re-label this layer as Philadelphia Housing. Save the new document as Phil_Housing_7 (for Assignment 7). (a) In this initial phase of the study you will construct a new spatial weight matrix for Philadelphia based on boundary shares. This type of weight matrix is more appropriate for areal data such as contiguous census tracts. The procedure for doing so is outlined in the CLASS NOTEBOOK on the class web page. Scroll down to part IV and open section 3.2.3 in Using Matlab, called “Making Boundary-Share Weight Matrices using ARCMAP and MATLAB”. Here a detailed procedure is outlined using the Eire data set illustrated in class. 1. In using this procedure you can here start at step (1.2) by constructing a second copy of the shapefile, Final_Tracts, say Final_Tracts_0. Now continue the procedure up to Step (1.5). 2. In Step (1.5) you will obtain a file, Final_Tracts_Intersect. (This may take several minutes to complete.) If you open the Attribute Table as in step (1.6) and look at the bottom of the window, you should see that there are 3507 polyline features, representing shared boundary segments. Working with feature files this size can be very slow – so be patient! 3. When the new field, HowLong, is fully calculated this will give you the lengths of all shared boundaries. To gain some feeling for how this works, select the column, ID1, just to the left of HowLong, that contains the row IDs of one of the tracts sharing the boundary segment in that row. Reorder this column in ascending order (right click on the column and select Sort Ascending) and now scroll down to ID1 = 284. You should see seven rows with 284. Select the first row (HowLong = 9471.09), find the selected segment on the map, and enlarge that area. You should now see that this census tract (FID = 283) appears to be a “peninsula” defined by two missing tracts (with zero population) connected by the Schuylkill River. Notice in particular that this boundary-share procedure excludes connections between this census tract and all others on the east side of the river. However, if this map had been drawn more crudely (or if the river had been very narrow) so that the river was a single curve, then tracts on the east side would now share boundaries with this tract. Since these conventions are often arbitrary, you should be aware that boundary shares can sometimes yield strange results. Hence you should always look at the map to be sure that these results are reasonable. Note also that the remaining six rows come in pairs, and refer to the segments shared with three other tracts (FID = 268,272,281). So boundaries shared with no other tract appear once2(with ID = ID1) and those shared with other tracts appear twice. [This distinction is used in the MATLAB program, shared_bd_lengths.m, below to identify those boundary segments shared with other tracts.] 4. Now carry out the steps up to (2.1) where you should obtain a text file, shared_bd_length.txt, containing only columns, (ID,ID1,HowLong). In step (2.2) when you import these results to MATLAB, you should open the workspace Phil_Housing.mat created in Assignment 6, and import the text file, shared_bd_length.txt, to this workspace. 5. Rename this as DAT, and construct M as in step (2.2) using the program, shared_bd_lengths.m. As a consistency check, now type the command » M(284,:)' and you should see the output (269,1) 1884.6 (273,1) 627.8 (282,1) 2032.3 listing the lengths of boundary segments shared with tract 284 (FID = 283). [The reason for this simple output format is that the matrix M is in sparse form (as can be seen by both the matrix icon and class label in the workspace). Note also the transpose at the end, which converts rows to columns.] 6. Finally, you should row normalize this matrix with the command » W0 = row_norm(M); This will avoid overwriting the four-nearest-neighbors weight matrix, W, constructed in Assignment 6. Check the workspace to be sure that W0 is a 353x353 matrix. Note: For boundary shares weight matrices such as W0 this row normalization has a clearer interpretation than in most cases. Here one measures the “influence” of tract j on tract i in terms of the fraction of total shared-boundary for tract i that is shared with tract j. Notice also that unlike most spatial weights, this measure is fundamentally asymmetric. In particular if total shared boundary of tract j is relatively large compared to that of tract i, then the “influence” of i on j may well be smaller than that of j on i. 7. Since W0 is also seen to be in sparse form. we can now represent row 284 of W0 by writing: » W0(284,:)'3 to obtain the output: (269,1) 0.41468 (273,1) 0.13814 (282,1) 0.44718 This is seen to be a normalization of the lengths above, which now add to one. [It is worth noting here that if a given matrix, A, is not sparse, you can make a sparse copy, AA, by writing » AA = sparse(A); This will allow you to examine the rows (or columns) of A in the above format by using AA.] 8. Finally, as a second illustration that these weights need not always be the most “reasonable” ones, write: » W0(353,:)' Check this result in ARCMAP and comment on your findings. (b) Given this boundary-share weight matrix, W0, it is now appropriate to recheck for the presence of spatial autocorrelation in the OLS residuals by using W0. Rather than regressing on nearest-neighbor residuals, you will here use the more flexible approach based on the random permutation tests in the MATLAB program sac_perm. This program allows any weight matrix to be used, and also reports three different indices (I, rho, r). The first,


View Full Document

Penn ESE 502 - ESE 502 Assignment

Download ESE 502 Assignment
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view ESE 502 Assignment and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view ESE 502 Assignment 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?