Dear r-sig-geo list!

I run gwr on a multi-node cluster(on 64 slots). In the gwr output (slot 
"SDF"), the gwr residuals and the local R-squared are missing. When 
performing the same model on the local machine, these components are 
included. Unfortunately, the calculation in this way takes about 5 days 
instead of few hours when using the cluster.

Perhaps, that problem arises due to the argument "fit.points", which has 
to be passed if the local coefficient estimates should be made on a 
multi node cluster.

Does anyone have an idea how to solve that problem with the missing 
local R-squared and residuals if the gwr is calculated on a cluster?


Thank you very much in advance!

Kind regards,

Max


selected R-code:

### gwr on local machine:

gwr_50 <- 
gwr(hef@data$DIF~hef@data$ELEVATION+hef@data$SKY+hef@data$SLOPE+hef@data$SOLAR, 
data=hef, bandwidth=50, gweight=gwr.Gauss)


# part of the  str(gwr_50) output...


List of 11
  $ SDF      :Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
   .. ..@ data       :'data.frame':	286288 obs. of  9 variables:
   .. .. ..$ sum.w      : num [1:286288] 2009 2003 2091 2089 2086 ...
   .. .. ..$ (Intercept): num [1:286288] -28.7 -28.5 -29.9 -29.7 -29.5 ...
   .. .. ..$ elevation  : num [1:286288] 0.0139 0.0138 0.014 0.014 0.014 ...
   .. .. ..$ sky        : num [1:286288] -0.153 -0.155 -0.146 -0.148 -0.149 ...
   .. .. ..$ slope      : num [1:286288] -2.58 -2.61 -2.42 -2.45 -2.48 ...
   .. .. ..$ solar      : num [1:286288] -0.00139 -0.00136 -0.0015 -0.00147 -0.00144 ...
   .. .. ..$ gwr.e      : num [1:286288] -0.461 -0.683 -0.5987 -0.2692 0.0406 ...
   .. .. ..$ pred       : num [1:286288] 0.806 0.833 0.507 0.514 0.576 ...
   .. .. ..$ localR2    : num [1:286288] 0.621 0.618 0.638 0.635 0.632 ...




### gwr on cluster :

cl <- makeCluster(32, type="MPI")

coords <- coordinates(hef)

gw <- 
gwr(hef@data$DIF~hef@data$ELEVATION+hef@data$SKY+hef@data$SLOPE+hef@data$SOLAR, 
data=hef, bandwidth=50, gweight=gwr.Gauss,fit.points=coords, 
hatmatrix=FALSE, cl=cl)

# part of the  str(gwr_50) output...

List of 11
  $ SDF      :Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
   .. ..@ data       :'data.frame':	286288 obs. of  6 variables:
   .. .. ..$ sum.w      : num [1:286288] 1 1 1 1 1 ...
   .. .. ..$ (Intercept): num [1:286288] 12541 1970 2057 -1505 -1030 ...
   .. .. ..$ elevation  : num [1:286288] -3.891 -0.602 -0.738 0.465 0.309 ...
   .. .. ..$ sky        : num [1:286288] -0.954 -0.425 3.714 0.159 0.152 ...
   .. .. ..$ slope      : num [1:286288] 62.19 NA -27.21 1.95 16.03 ...
   .. .. ..$ solar      : num [1:286288] NA NA NA NA 0.042 ...




	[[alternative HTML version deleted]]

