Spatial autoregressive model implementation in R I need to implement a SAR model with no covariates. To be more specific, the regression I have to estimate is y=bWy+e where: 


*

*y is the dependent variable;

*b is the coefficient parameter to be estimated;

*W is the adjacency matrix;

*e is the error.


My idea was to use the lagsarlm function of the spdep package. But I've gone through spdep documentation and it seems that this function works only adding covariates: i.e. y=bWy+cX+e, and I don't know how to erase the X term.
Note: For those who are acquainted with network analysis literature and not with spatial econometrics, in a way this is a method to estimate a parameter for bonachich centrality.
 A: You can fit an intercept only model, e.g. $y = a + \rho W y + e$ in lagsarlm.
library(spdep)
data(oldcol)
Bin_W <- nb2listw(COL.nb, style="B")
Empt <- lagsarlm(CRIME ~ 1, data=COL.OLD, listw=Bin_W)
summary(Empt)

I don't think there is anything wrong with using $\rho$ with the intercept to calculate your centrality measure, but I am not sure 100% sure. Lesage and Pace in Introduction to Spatial Econometrics then describe the Bonachich centrality measure (pg. 15) as:
$$b = (I_n - \rho P)^{-1}\cdot l_n$$
where $I_n$ is the identity matrix, $P$ is the binary contiguity matrix, $\rho$ is the estimate in the prior equation, and $l_n$ are a column vector of ones. The intercept then subsequently just ends up being a scaling factor that can be ignored I believe.
#Making Bonachic centrality 
W <- nb2mat(COL.nb, style="B")
I <- diag(dim(W)[1])
Ones <- rep(1,dim(W)[1])
bonCent <- solve(I - Empt$rho*W) %*% Ones

I was going to recommend just calculating the spatial lag and looking at the covariance, but in this example there are very big differences between the estimate of $\rho$ when using a contiguity matrix versus and row standardized matrix.
