trW                  package:spdep                  R Documentation

_S_p_a_t_i_a_l _w_e_i_g_h_t_s _m_a_t_r_i_x _p_o_w_e_r_s _t_r_a_c_e_s

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

     The function is used to prepare a vector of traces of pwers of a
     spatial weights matrix

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

     trW(W, m = 100, p = 50, type = "mult")

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

       W: A spatial weights matrix in CsparseMatrix form

       m: The number of powers

       p: The number of samples used in Monte Carlo simulation of the
          traces if type is MC

    type: Either mult (default) for powering a sparse matrix, or MC for
          Monte Carlo simulation of the traces

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

     A numeric vector of 'm' traces.

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

     Roger Bivand Roger.Bivand@nhh.no

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

     LeSage J and RK Pace (2009) Introduction to Spatial Econometrics.
     CRC Press, Boca Raton, pp. 96-105.

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

     'as_dgRMatrix_listw', 'nb2listw'

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

     example(columbus)
     listw <- nb2listw(col.gal.nb)
     W <- as(as_dgRMatrix_listw(listw), "CsparseMatrix")
     trMat <- trW(W, type="mult")
     str(trMat)
     trMC <- trW(W, type="MC")
     str(trMC)
     plot(trMat, trMC)

