<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-family: Tahoma,Arial,Helvetica,sans-serif'>
<!-- html ignored --><!-- head ignored --><!-- meta ignored --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 --><!-- node type 8 -->
<p>Hi.</p>
<p>I’m working on a `spatial cross section model` with `R-programming-language `. I’m running these codes which refers to `anselin data` (spatial_columbus) in `spdep` package. I found them from these links:</p>
<p><strong>Main page :</strong> https://sites.google.com/site/econometricsacademy/econometrics-models/spatial-econometrics</p>
<p><strong>Dataset :</strong> https://docs.google.com/file/d/0BwogTI8d6EEiZVdBSlgwdmFjTUk/edit?pli=1</p>
<p> </p>
<p>    library(spdep)# Loading required package: sp &Loading required package: Matrix</p>
<p>    data(Columbus)</p>
<p>    mydata<-columbus</p>
<p>    attach(mydata)</p>
<p>    y<-cbind(CRIME)</p>
<p>     x<-cbind(INC,HOVAL)</p>
<p>    xy<-cbind(mydata$X, mydata$Y)</p>
<p>    neighbors<-col.gal.nb</p>
<p>    coords<-coords</p>
<p>    summary(neighbors)</p>
<p> </p>
<p>When I used these codes for data (columbus) in `spdep` package, everything is fine, but when I want apply them to my data (human capital index) I’m not able to define `neighborhood` for my data . My problem is in this line `( neighbor<-col.gal.nb)`.it’s the neighbors list from an original `GAL-format file` and it’s a pre-defined file . I don’t know any codes for creating neighbors to my data and I think my data framework is different from spatial Columbus data framework (There is <strong>`AREA`</strong>, <strong>`PERIMETER`</strong>,<strong>`ID`</strong> and<strong> `polyID`</strong> columns that I don’t have these columns in my data framework).</p>
<p> </p>
<p>The help link for `col.gal.nb` is here (you can open this link in R environment after above codes)</p>
<p>    http://127.0.0.1:20991/library/spdep/html/columbus.html</p>
<p> </p>
<p> </p>
<p><strong>My questions are:</strong></p>
<p>1. How can I use `ArcGIS`  to create `AREA` and `PERIMETER` to my data file? I have some counties as samples. Are any easier solution for finding these values or I should only use `ArcGIS` for this purpose?</p>
<p>2. Which code pack can I use to creating neighbors based on contiguity and distance in `R`?</p>
<p>My dependent variable is `HCI `and `Y` is latitude, `X` is longitude and other variables are independent variables.</p>
<p> </p>
<p>My data set framework : http://www.mediafire.com/view/lf43qm1h5ptztt6/spatial_columbus.csv</p>
<p>Pre-defined framwwork : http://www.mediafire.com/view/ml76tbrf6p69vkf/human_capital_index.csv</p>
<p> </p>
<p>Thank you so much for your kind helps.</p>
<div> </div>
<div> </div>
</body></html>