[R-sig-Geo] Spatial Lag and Error Model

Roger Bivand Roger.Bivand at nhh.no
Thu Mar 24 09:27:13 CET 2011


On Wed, 23 Mar 2011, Janmaat, John wrote:

> Hello,
>
>
>
> I have a city water use dataset with almost 12000 observations.  I am
> using spdep.  I am using K nearest neighbours (4) to build the neighbour
> list.  I am trying to estimate a model to predict household water use,
> controlling for a set of independent variables like lot size, house
> size, etc.  The spatial model diagnostics, lm.LMtests, suggests that
> there is both a spatial error and a spatial lag in the data.  However,
> on the lm estimations (lagsarlm,errorsarlm), report that the system is
> singular.  I can estimate the model using GMerrorsar and lagmess.
> However, gstsls exits with the same error as the lm estimations.
>
> Is there a function I am missing to estimate a model with both spatial
> autocorrelation and a spatial lagged dependent variable that won't have
> the singularity problem?
>

Well, what we are missing are the verbatim error messages and function 
calls. It may well be that your diagnosis of the problem is not precise 
enough, especially as the code used depends on your choice of input 
arguments. Does lm() of the same model report any unfitted coefficients 
(are there near-linear dependencies present in the X variables, or between 
X and WX)?

Roger

>
>
> Thanks,
>
>
>
> John.
>
>
>
> --------------------
>
> Dr. John Janmaat
>
> Department of Economics
>
> I.K. Barber School of Arts and Sciences
>
> University of British Columbia - Okanagan Campus
>
> 3333 University Way, Kelowna, BC
>
> V1V 1V7
>
> Tel: (250)807-8021
>
> WWW: http://people.ok.ubc.ca/jjanmaat/
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> 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