NY_data

0th

Percentile

New York leukemia data

New York leukemia data taken from the data sets supporting Waller and Gotway 2004 (the data should be loaded by running example(NY_data) to demonstrate spatial data import techniques).

Keywords
datasets
Usage
data(NY_data)
Details

The examples section shows how the DBF files from the book website for Chapter 9 were converted into the nydata data frame and the listw_NY spatial weights list.

Format

A data frame with 281 observations on the following 12 variables, and the binary coded spatial weights used in the source.

Source

http://web1.sph.emory.edu/users/lwaller/ch9index.htm

References

Waller, L. and C. Gotway (2004) Applied Spatial Statistics for Public Health Data. New York: John Wiley and Sons.

Aliases
  • NY_data
  • nydata
  • listw_NY
Examples
## NY leukemia
library(foreign)
nydata <- read.dbf(system.file("etc/misc/nydata.dbf", package="spdep")[1])
coordinates(nydata) <- c("X", "Y")
nyadjmat <- as.matrix(read.dbf(system.file("etc/misc/nyadjwts.dbf",
 package="spdep")[1])[-1])
ID <- as.character(names(read.dbf(system.file("etc/misc/nyadjwts.dbf",
 package="spdep")[1]))[-1])
identical(substring(ID, 2, 10), substring(as.character(nydata$AREAKEY), 2, 10))
nyadjlw <- mat2listw(nyadjmat, as.character(nydata$AREAKEY))
listw_NY <- nb2listw(nyadjlw$neighbours, style="B")
Documentation reproduced from package spdep, version 0.6-9, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.