[R-sig-Geo] local R2

Roger Bivand Roger.Bivand at nhh.no
Fri Nov 27 13:12:49 CET 2009


On Fri, 27 Nov 2009, Eda Laze wrote:

> Hello,
>
> I am currectly using gwr in R to get local R2. I have a shape file -
> polygon data.
> When I write codes as below: case 1 and 2, I get two different Local
> R2 values and maps:
>
> case1.adpt<-gwr(FCHA~PAC1+PAC2+PAC6, data=filename,
> coords=cbind(filename$X, filename$Y), adapt= 0.01, longlat=TRUE).
> case2.adpt<-gwr(FCHA~PAC1+PAC2+PAC6, data=filename,
> coords=cbind(filename$X, filename$Y), adapt= 0.01, hatmatrix = TRUE,
> se.fit=TRUE). Local R2 have different values from case 1 and map is
> different as well.

In the second case, you are not using longlat=TRUE, which will give rather 
different weights. Please only give examples with available data sets, and 
include say the first 5 local R2 values, so that helpers know that they 
are looking at the same thing as you are. Always state the output of 
sessionInfo().

Hope this helps,

Roger

>
> Furthermore, when I visualize case 1: i.e., local R2 on map, each
> polygon has a certain value and responding color while in case 2: map
> shows clustering of Local R2 (values) similar to Georgia case study.
> However, I wonder why this happen and which is the right way to get
> local R2.
>
> I read spgwr manual and update. Though an accurate answer is very welcome.
>
> Thank you.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> 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