[R-sig-Geo] GWmodel package results

bhartendupandey bhartendu1988pandey at gmail.com
Thu Jul 17 16:53:12 CEST 2014


Dear Dr. Lu,

Thank you for your prompt reply.

I understand that these are two different versions with different default
kernel functions. But I noticed something strange here. Even when I specify
the kernel function in bw.ggwr() as "bisquare" and run the code in the two
versions, i.e., GWmodel_1.2-1 and GWmodel_1.2-3, I get different bandwidth
estimates. This further is yielding inconsistent parameter estimates from
the two versions of the package. This is, in fact, keeping me confounded of
the reliability of results from the two versions. Or if the differences here
is merely because I am doing something anomalous.
 
I ran the following codes in two different computers installed with
different versions of the GWmodel package, as stated above: 

rm(list=ls())
require(GWmodel)
data(LondonHP)
DM<-gw.dist(dp.locat=coordinates(londonhp))
bw.f2 <- bw.ggwr(BATH2~FLOORSZ,data=londonhp, dMat=DM,family
="binomial",adaptive=T, kernel='bisquare',approach='AIC')
res.binomial<-gwr.generalised(BATH2~FLOORSZ, bw=bw.f2,data=londonhp,
dMat=DM,
              family ="binomial",adaptive=T, kernel='bisquare')

rm(list=ls())
require(GWmodel)
data(LondonHP)
DM<-gw.dist(dp.locat=coordinates(londonhp))
bw.f2 <- bw.ggwr(BATH2~FLOORSZ,data=londonhp, dMat=DM,family
="binomial",adaptive=F, kernel='bisquare',approach='AIC')
res.binomial<-gwr.generalised(BATH2~FLOORSZ, bw=bw.f2,data=londonhp,
dMat=DM,
              family ="binomial",adaptive=F, kernel='bisquare')


When I run this code in computer 1, I get, 

1.  Adaptive bandwidth: 269 (number of nearest neighbors)
2.  Fixed bandwidth: 36091.69 

and when I run it in computer 2, I get 

1. Adaptive bandwidth: 273 (number of nearest neighbors)
2. Fixed bandwidth: 35582.65  

Computer 1:

> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] GWmodel_1.2-3     robustbase_0.91-1 maptools_0.8-30   sp_1.0-15        

loaded via a namespace (and not attached):
[1] DEoptimR_1.0-1  foreign_0.8-61  grid_3.1.0      lattice_0.20-29
[5] tools_3.1.0    


Computer 2: 

> sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] GWmodel_1.2-1     robustbase_0.9-10 maptools_0.8-26   sp_1.0-11        

loaded via a namespace (and not attached):
[1] foreign_0.8-53  grid_3.0.0      lattice_0.20-15 tools_3.0.0   


I thank you for your help and time. 

Best regards,
Bhartendu Pandey




--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/GWmodel-package-results-tp7586742p7586753.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list