Learn R Programming

splm (version 1.6-5)

listw2dgCMatrix: Interface between Matrix class objects and weights list

Description

Interface between Matrix class objects and weights list

Usage

listw2dgCMatrix(listw, zero.policy = NULL)

Value

Matrix class object: a sparse Matrix

Arguments

listw

a listw object created for example by spdep::nb2listw

zero.policy

See lagsarlm for details

Author

Gianfranco Piras

Examples

Run this code
data(columbus, package="spdep")
listw<-spdep::nb2listw(col.gal.nb)
spW<-listw2dgCMatrix(listw)

Run the code above in your browser using DataLab