[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


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 Sanderson
Centre for Life Sciences Modelling
Porter Building
University of Newcastle
Newcastle upon Tyne
United Kingdom

Tel: +44 191 222 7789

r.a.sanderson at newcastle.ac.uk

More information about the R-help mailing list