[R-sig-Geo] testing for spatial variability of the parameters in GWR with R

Roger Bivand Roger.Bivand at nhh.no
Wed May 6 20:34:50 CEST 2009

On Wed, 6 May 2009, Marie CHARRU wrote:

> Thank you Roger.
> I did'nt know what this LMZ.F3GWR.test() function was for. It seems that
> it is what I need, but when I try to run it, I have an error message
> coming up :
> /Error: cannot allocate vector of size 52.5 Mo.
> /I read on the R-sig-geo list that this could be due to the size of my
> dataset (3710 points) and that there was no way around... In that case,
> how to test big datasets ? The tests I'm doing now concern just one part
> of the total sample, so the problem will get bigger when I use all my data !
> Would a random selection of points in the dataset be suitable for
> testing the spatial variability of the parameters ?

All the tests on GWR involve operations on dense n by n matrices, 
which means that multiple versions of these matrices will be in memory. It 
is possible that LMZ.F3GWR.test() could be altered to use less memory, but 
even so this may not help enough. To check smaller data sets, you would 
need random tiles of the data (so that the relative postions are 


> Thanks for your help
> Marie
> On Wed, 6 May 2009, Marie CHARRU wrote:
>> Hi !
>> I would like to know how to carry out the test for spatial variability
>> of the parameters of a geographically weighted regression model in R.
>> A test using a Monte Carlo approach is described in Fotheringham &
>> al., 2002, but I can't find how to run it with R.
>> I would appreciate any help about this matter.
> See the LMZ.F3GWR.test() function in the spgwr package for the Leung et
> al. test - other tests for GWR against OLS, but not for coefficients,
> are in that package. The help page has examples. Are you looking for
> other tests?
> Hope this helps,
> Roger
> PS. Consider posting on the R-sig-geo list, where others may be able to
> help more.
>> Thank you,
>> Marie
>> / /

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