[R-sig-Geo] spatial durbin model with large asymmetric data

Willemijn Vroege WillemijnVroege at hotmail.com
Thu Nov 10 16:17:54 CET 2016


Hello,

I use the spdep package for spatial durbin modelling in R. I have many observations (>60'000) and use a k-nearest neighbourhood definition leading to asymmetry.
For a subset of my data my script runs fine, however when I include all the observations, the vector to be allocated is too large.
As far I understand, I should create a sparse matrix with LU factorization.

Now I use the command:

nb<-knn2nb(knearneigh(coords, k=10), row.names=IDs)
dsts <- nbdists(kn10, coords)
idw <- lapply(dsts, function(x) 1/(x))
nb1<- nb2listw(kn10, glist = idw, style = "B")
lag<-lagsarlm(x ~ y, data=df, listw =nb1, type = "mixed", method = ??, tr=??)

How do I need to specify the matrix and how can I include it in the lagsarlm command to continue with my large dataset?
Thanks a lot for your help,
Willemijn


	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list