[R] lagsarlm - using mixed explanatory variables (spdep package)

Roy Sanderson R.A.Sanderson at newcastle.ac.uk
Thu Nov 27 13:48:39 CET 2003


Hello

I'm very new to R (which is excellent), so apologies if this has already
been raised.  In the spdep package, I'm trying to undertake an
autoregressive mixed model using the lagsarlm function.  This is working
fine, but there does not appear to be a method of including an explanatory
variable without it automatically being included as a lagged term.  I'm
after something along the lines of

y = rho.W.y + x1 + x2 + lag(x2)

but am only able to output

y = rho.W.y + x1 + x2 + lag(x1) + lag(x2)

Is there any way around this issue?

Many thanks
Roy

----------------------------------------------------------------------------
Roy Sanderson
Centre for Life Sciences Modelling
Porter Building
University of Newcastle
Newcastle upon Tyne
NE1 7RU
United Kingdom

Tel: +44 191 222 7789

r.a.sanderson at newcastle.ac.uk
http://www.ncl.ac.uk/clsm




More information about the R-help mailing list