[R-sig-Geo] Creating listw object from n by n matrix

Roger Bivand Roger.Bivand at nhh.no
Thu May 5 08:14:50 CEST 2011


On Sun, 1 May 2011, Sebastian Brandt wrote:

> Dear List,
>
> I have n datsets that I would like to test for spatial dependence using 
> the lm.LMtests function. I have computed a n by n row-standardised 
> spatial weights matrix that I have imported into R workspace from a 
> csv.-file.
>
> Running the lm.LMtests function I get an error message that the n by n 
> matrix is not a listw object. How can I convert the matrix into a listw 
> object?

?mat2listw

All of this is described in detail in ASDAR.

Roger

>
> I would be grateful for any help.
>
> Sebastian
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list