Hi, all
I want to implement spatial model with spdep packages.Let me see the example,


data(oldcol)
COL.lag.eig <- lagsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, nb2listw(COL.nb))
summary(COL.lag.eig, correlation=TRUE)


In the above, the neighbours spatial weight matrix created by nb2listw is used. Now I 
want to employ the inv distance weight matrix directly.


For example, I creat the inv distance using the following codes (source:http://statistics.ats.ucla.edu/stat/r/faq/morans_i.htm)
ozone<-read.table("http://www.ats.ucla.edu/stat/r/faq/ozone.csv", sep=",", header=T)
ozone.dists <- as.matrix(dist(cbind(ozone$Lon, ozone$Lat)))
ozone.dists.inv <- 1/ozone.dists
diag(ozone.dists.inv) <- 0


I want to employ the "ozone.dists.inv" matrix with my empirical analysis.
That is to say 
COL.lag.eig <- lagsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, ozone.dists.inv)


I can implement it with Matlab quickly.However,I cannot implement it with R 


Could anyone help me? Or give me some suggestions?


Best,
wanhai










	[[alternative HTML version deleted]]

