NY_data                package:spdep                R Documentation

_N_e_w _Y_o_r_k _l_e_u_k_e_m_i_a _d_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     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).

_U_s_a_g_e:

     data(NY_data)

_F_o_r_m_a_t:

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

     '_A_R_E_A_N_A_M_E' name of census tract

     '_A_R_E_A_K_E_Y' unique FIPS code for each tract

     '_X' x-coordinate of tract centroid (in km)

     '_Y' y-coordinate of tract centroid (in km)

     '_P_O_P_8' population size (1980 U.S. Census)

     '_T_R_A_C_T_C_A_S' number of cases 1978-1982

     '_P_R_O_P_C_A_S' proportion of cases per tract

     '_P_C_T_O_W_N_H_O_M_E' percentage of people in each tract owning their own
          home

     '_P_C_T_A_G_E_6_5_P' percentage of people in each tract aged 65 or more

     '_Z' ransformed propoprtions

     '_A_V_G_I_D_I_S_T' average distance between centroid and TCE sites

     '_P_E_X_P_O_S_U_R_E' "exposure potential": inverse distance between each
          census tract centroid and the nearest TCE site, IDIST,
          transformed via log(100*IDIST)

_D_e_t_a_i_l_s:

     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.

_S_o_u_r_c_e:

     <URL: http://www.sph.emory.edu/~lwaller/ch9index.htm>

_R_e_f_e_r_e_n_c_e_s:

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

_E_x_a_m_p_l_e_s:

     ## NY leukemia
     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")

