[Openspace] problems in tol.solve (spdep)

Roger Bivand Roger.Bivand at nhh.no
Wed Apr 28 20:55:53 CDT 2004


On Wed, 28 Apr 2004, Mario Gellrich wrote:

> Hi!
> 
> I am using Roger Bivands spdep package in R and obtained error messages by 
> using the default of 1.0e-7 in tol.solve in spatial lag and error models 
> (lagsarlm, errorsarlm). My dataset contains ca. 1,200 columns. I calculated 
> the spatial weights by using 3, 5, and 8 nearest neighbours (polygon 
> centroids). The spatial weight matrix is row standardized. Tests on spatial 
> dependence as well as on heteroscedasticity indicates that there is no 
> misspecification in the models. If I set the tol.solve= option to values 
> larger or equal to values derived from the error message (say 1.0e-18), it 
> works. Tests showed that parameter estimates and significances are not 
> influenced by changing the tol.solve. Since the handbook points out that 
> "errors in solve() may constitute indications of misspecification", my 
> questions are, what exactly does tol.solve mean, what sort of 
> misspecification could it be if I obtain errors and does it influence model 
> outputs(particularly significances and parameter estimates) if I lower the 
> tol.solve-value to a level as e.g. in the example above.
> 

The tol.solve value is used in inverting the matrix for the variances and 
covariances of the betas, sigma, and the rho or lambda coefficients. In R 
previously, LINPACK routines were used that were less sensitive to the 
distribution of values in this matrix. For some time now, a superior 
LAPACK routine is called in solve(). This is more sensitive to the range 
of values in the matrix being inverted. I have seen values in such 
matrices differing by over 10 orders of magnitude, depending on the 
relative scales of the y variable and the RHS variables in relation to the 
spatial coefficient. So it isn't misspecification in substantive terms, 
but is a possible numerical weakness in calculating the asymptotic 
variance-covariance matrix. I haven't tried to re-scale the y or X 
variables, but I think that doing this might remove the issue. Setting the 
argument to a very small number is also a way out, and is easier in 
practice.

Roger Bivand


> Best regards
> 
> Mario Gellrich
> 
> _______________________________________________
> Openspace mailing list
> Openspace at sal.agecon.uiuc.edu
> http://sal.agecon.uiuc.edu/mailman/listinfo/openspace
> 

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




More information about the Openspace mailing list