nblag                 package:spdep                 R Documentation

_H_i_g_h_e_r _o_r_d_e_r _n_e_i_g_h_b_o_u_r_s _l_i_s_t_s

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

     The function creates higher order neighbour lists, where higher
     order neighbours are only 'lags' links from each other on the
     graph described by the input neighbours list. It will refuse to
     lag neighbours lists with the attribute self.included set to TRUE.

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

     nblag(neighbours, maxlag)

_A_r_g_u_m_e_n_t_s:

neighbours: input neighbours list of class 'nb'

  maxlag: the maximum lag to be constructed

_V_a_l_u_e:

     returns a list of lagged neighbours lists each with class 'nb'

_A_u_t_h_o_r(_s):

     Roger Bivand Roger.Bivand@nhh.no

_S_e_e _A_l_s_o:

     'summary.nb'

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

     data(columbus)
     summary(col.gal.nb, coords)
     library(maptools)
     plot(polys, border="grey", forcefill=FALSE)
     plot(col.gal.nb, coords, add=TRUE)
     title(main="GAL order 1 (black) and 2 (red) links")
     col.lags <- nblag(col.gal.nb, 2)
     summary(col.lags[[2]], coords)
     plot(col.lags[[2]], coords, add=TRUE, col="red", lty=2)

