asMatrixCsrListw            package:spdep            R Documentation

_C_o_n_v_e_r_t _s_p_a_t_i_a_l _w_e_i_g_h_t_s _l_i_s_t _t_o _C_S_R _m_a_t_r_i_x _f_o_r_m

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

     'asMatrixCsrListw' creates a 'matrix.csr' from a 'listw' object,
     'asMatrixCsrIrW' is a helper function used in fitting SAR models
     and elsewhere to make a (I - rho W) 'matrix.csr' object from W;
     'asListwMatrixCsr' performs the reverse conversion from
     'matrix.csr' to 'listw' object.

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

     asMatrixCsrListw(listw)
     asMatrixCsrIrW(W, rho)
     asMatrixCsrI(n)
     asListwMatrixCsr(mcsr)

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

   listw: a 'listw' object created for example by 'nb2listw'

       W: a 'matrix.csr' object created using 'asMatrixCsrListw' from a
          'listw' object

     rho: spatial regression coefficient

       n: length of diagonal for identity matrix

    mcsr: a 'matrix.csr' object

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

     'asMatrixCsrListw' and 'asMatrixCsrIrW' return 'matrix.csr'
     objects; 'asListwMatrixCsr' returns a 'listw' object

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

     Roger Bivand Roger.Bivand@nhh.no

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

     'as.matrix.csr'

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

     data(oldcol)
     COL.W <- nb2listw(COL.nb, style="W")
     COL.W
     image(asMatrixCsrListw(COL.W))

