[R-sig-Geo] Mean Effects SAR Model

Larry Layne ljlayne at unm.edu
Mon Apr 3 22:46:15 CEST 2006


Hello!

I would like to estimate the parameters for the SAR model: Y = pWY + XB + 
e, as a pure mean effects model for Y. I want to use the residuals from 
this model in other analyses. I attempted to use lagsarlm from the spdep 
library to do this. I do not know how to specify a mean effects only 
regression model in either lagsarlm or lm, I suppose. For lagsarlm I 
assumed that I could specify 1 regressor as X1 = 0, and the model syntax as 
Y ~ X1. I thought this would leave only the intercept term, B0, and pWY, 
and I could just extract the residuals from the output. Unfortunately I 
only get an error. If I use real data in the variable X1 and specify the 
model as Y ~ X1, the function runs without error, but has parameter 
estimates for B0, B1 and p. Does anyone know if it is possible to compute 
the parameter estimates for a pure mean effects model in lagsarlm, and if 
so, how the syntax should be specified in the function? Should I be using 
something like errorsarlm instead?

Larry Layne
ljlayne at unm.edu




More information about the R-sig-Geo mailing list