[R-sig-Geo] Mean Effects SAR Model

Roger Bivand Roger.Bivand at nhh.no
Mon Apr 3 23:01:05 CEST 2006


On Mon, 3 Apr 2006, Larry Layne wrote:

> Hello!
> 
> I would like to estimate the parameters for the SAR model: Y = pWY + XB + 
> e, as a pure mean effects model for Y. 

What is a mean effects model when it is not in your dialect of data 
analysis?

Try:

lm(Y ~ 1)
mean(Y)

If you mean lagsarlm() with just the intercept on the right hand side, 
please see ?formula:

lagsarlm(Y ~ 1, ...) will just fit an intercept (as will the equivalent
call to errorsarlm(), but of course giving a different intercept). There
has to be a right hand side of the formula, though, Y ~ 0 will not work.

Roger

> 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
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list