I am using lagsarlm
in spdep package in r
to estimate a spatial Durbin (mixed) model by
m1 <- lagsarlm(f, data = d, wlist, type = "mixed")
where f
is my designed model of dependent variable and independent variables, d
is a set of data points loaded from csv file, and wlist
is the spatial weight list. The regression of SDM works fine for me. And I used predict function:
pred <- predict(m1,newdata = d, listw = wlist)
with the original data and spatial weight list to estimate the dependent variable. The estimation is different from the fitted.value
in model object m1
.
From my understanding, the fitted.value
in an Sarlm object is estimated with assumption that dependent variables are known. I wonder how does the predict
function estimate a spatial mixed model with lag on both dependent and independent variables.
I checked the documents of sarlm and it provides the information of predicting with spatial lag model. I could not find a prediction formula for the spatial mixed model.