[R-sig-Geo] SPGWR - gw.adapt() command question

Roger Bivand Roger.Bivand at nhh.no
Thu Jul 11 09:33:57 CEST 2013


On Wed, 10 Jul 2013, Paul Bidanset wrote:

> Hello all,
>
> I am doing some exploratory analysis with adaptive and fixed kernels in the
> SPGWR package. I am hoping to glean further insight from someone who has a
> better understanding of the gw.adapt(dp, fp, quant, longlat=FALSE) command.
> I understand 'quant' is proportion of data points to include in the weight.
> Is there a common trade off moving from 0 to 1? The bandwidth it assigns
> are consistently much larger and perform significantly worse than when
> employing a fixed bandwidth, which seems counter-intuitive to much of the
> literature I am reading. As the proportion I use increases, some of the
> bandwidths are reaching as high as 200 km, which I know cannot be correct
> as the geographical area is no more than 30 square kilometers.

If you do not provide a reproducible example, the only conclusion is that 
your usage of the function - which is used internally rather than by users 
- is incorrect. I can reproduce your artefact by using quant > 1, that is 
more than 100% of points included in the pointwise bandwidths:

library(spgwr)
data(columbus)
col.bw <- gwr.sel(crime ~ income + housing, data=columbus, 
coords=cbind(columbus$x, columbus$y), adapt=TRUE)
gw.adapt(cbind(columbus$x, columbus$y), cbind(columbus$x, columbus$y),
   quant=col.bw)
gw.adapt(cbind(columbus$x, columbus$y), cbind(columbus$x, columbus$y),
   quant=0.1)
gw.adapt(cbind(columbus$x, columbus$y), cbind(columbus$x, columbus$y),
   quant=0.9)
gw.adapt(cbind(columbus$x, columbus$y), cbind(columbus$x, columbus$y),
   quant=0.99)
gw.adapt(cbind(columbus$x, columbus$y), cbind(columbus$x, columbus$y),
   quant=15)

Is this your scenario?

Roger

>
> Any insight is very much appreciated.  I am very aware of the
> warnings and pitfalls of GWR ; I am simply looking to have a better
> understanding of the intuition behind this package and command
> specifically. Thanks very much for your time!
>
> Best,
>
> Paul
> Old Dominion University
>
> 	[[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
Department of Economics, NHH Norwegian School of Economics,
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