house                 package:spdep                 R Documentation

_L_u_c_a_s _c_o_u_n_t_y _O_H _h_o_u_s_i_n_g

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

     Data on 25,357 single family homes sold in Lucas County, Ohio,
     1993-1998 from the county auditor, together with an 'nb' neighbour
     object constructed as a sphere of influence graph from projected
     coordinates.

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

     data(house)

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

     The format is: Formal class 'SpatialPointsDataFrame' [package
     "sp"] with 5 slots. The data slot is a data frame with 25357
     observations on the following 24 variables.

     '_p_r_i_c_e' a numeric vector

     '_y_r_b_u_i_l_t' a numeric vector

     '_s_t_o_r_i_e_s' a factor with levels 'one' 'bilevel' 'multilvl'
          'one+half' 'two' 'two+half' 'three'

     '_T_L_A' a numeric vector

     '_w_a_l_l' a factor with levels 'stucdrvt' 'ccbtile' 'metlvnyl'
          'brick' 'stone' 'wood' 'partbrk'

     '_b_e_d_s' a numeric vector

     '_b_a_t_h_s' a numeric vector

     '_h_a_l_f_b_a_t_h_s' a numeric vector

     '_f_r_o_n_t_a_g_e' a numeric vector

     '_d_e_p_t_h' a numeric vector

     '_g_a_r_a_g_e' a factor with levels 'no garage' 'basement' 'attached'
          'detached' 'carport'

     '_g_a_r_a_g_e_s_q_f_t' a numeric vector

     '_r_o_o_m_s' a numeric vector

     '_l_o_t_s_i_z_e' a numeric vector

     '_s_d_a_t_e' a numeric vector

     '_a_v_a_l_u_e' a numeric vector

     '_s_1_9_9_3' a numeric vector

     '_s_1_9_9_4' a numeric vector

     '_s_1_9_9_5' a numeric vector

     '_s_1_9_9_6' a numeric vector

     '_s_1_9_9_7' a numeric vector

     '_s_1_9_9_8' a numeric vector

     '_s_y_e_a_r' a factor with levels '1993' '1994' '1995' '1996' '1997'
          '1998'

     '_a_g_e' a numeric vector

     Its projection is 'CRS(+init=epsg:2834)', the Ohio North State
     Plane.

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

     Dataset included in the Spatial Econometrics toolbox for Matlab,
     <URL: http://www.spatial-econometrics.com/html/jplv7.zip>.

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

     ## Not run: 
     house <- read.table("house.dat", header=FALSE)
     names(house) <- c("price", "yrbuilt", "stories", "TLA", "wall", "beds",
       "baths", "halfbaths", "frontage", "depth", "garage", "garagesqft", "rooms",
       "lotsize", "sdate", "avalue", "long", "lat", "s1993", "s1994", "s1995",
       "s1996", "s1997", "s1998")
     house$syear <- 1992 + house$s1993 + 2*house$s1994 + 3*house$s1995 +
     4*house$s1996 + 5*house$s1997 + 6*house$s1998
     house$syear <- factor(house$syear)
     house$age <- (1999 - house$yrbuilt)/100
     house$stories <- factor(house$stories, levels=1:7, labels=c("one",
      "bilevel", "multilvl", "one+half", "two", "two+half", "three"))
     house$wall <- factor(house$wall, levels=1:7, labels=c("stucdrvt",
      "ccbtile", "metlvnyl", "brick", "stone", "wood", "partbrk"))
     house$garage <- factor(house$garage, levels=0:4, labels=c("no garage",
      "basement", "attached", "detached", "carport"))
     library(sp)
     coordinates(house) <- c("long", "lat")
     proj4string(house) <- CRS("+proj=longlat")
     library(rgdal)
     house <- spTransform(house, CRS("+init=epsg:2834"))
     library(spdep)
     LO_nb <- graph2nb(soi.graph(tri2nb(coordinates(house)), coordinates(house)))
     W <- as(as_dgRMatrix_listw(nb2listw(LO_nb)), "CsparseMatrix")
     trMat <- trW(W, type="mult")
     ## End(Not run)
     data(house)
     ## maybe str(house) ; plot(house) ...

