[R-sig-Geo] Regression - large neighbour matrix - poor performance

Guilherme Ottoni g.ottoni at gmail.com
Mon Mar 7 20:25:38 CET 2016


Dear list,

I'm working with some land's Hedonic Pricing Model, at county level,
to determine how much few urban facilities would incrise the land's
value. The literature and the spatial exploratory data analysis show
that spatial effects should be considered while modeling.

The shapefile I'm using is points type, not polygons. So I took the
coordenates of the land points and generated the neighbour matrix
(distance range of 500m - file size 400mb). However, the matrix got
too big (as shown below).

I could manage to do the Moran's tests. When I tryed to run the SAR,
SEM and other models of spatial regression, I got the error mesage
saying R has reached the total memory size of the computer (8GB).

I tryed to change the "method" in the *sarlm types from "default" to
"LU", but the estimation is running for 3h so far and it seemd that
the Hessian maximization looped in certain value.

I got no clue whether I'm doing it the rightway or there is a smarter
way of doing so.

Any help would be very welcome!

------------------------------------------------------ ROUTINE
------------------------------------
mapa <- readShapePoints("OUC-ACLO_ITBI5500.shp")
mapa <- readOGR(".", "OUC-ACLO_ITBI5500")
OGR data source with driver: ESRI Shapefile
Source: ".", layer: "OUC-ACLO_ITBI5500"
with 25857 features
It has 42 fields

coords<-coordinates(mapa)
vizinhos <- dnearneigh(coords, d1=0, d2=500, row.names=IDs)
matriz_vizinhos <- nb2listw(vizinhos)

summary(vizinhos)
Neighbour list object:
Number of regions: 25857
Number of nonzero links: 15642996
Percentage nonzero weights: 2.339719
Average number of links: 604.9811

lag.fit<-lagsarlm(formula, data=mapa, listw=matriz_vizinhos,
method = "Matrix", quiet = FALSE)
----------------------------------------------------------------------------------------------------------------------

Cheers



More information about the R-sig-Geo mailing list