[R-sig-Geo] Error when running multiscale GWR: Error in gw_weight_vec: Not compatible > with requested type: [type=NULL; target=double]

Nikolaos Tziokas n|ko@@tz|ok@@ @end|ng |rom gm@||@com
Sun Feb 5 18:14:08 CET 2023


I am trying to run multiscale geographically weighted regression (MGWR)
using the GWmodel package in R. When running the function gwr.multiscale
this error is shown:

Error in gw_weight_vec(vdist, bw, kernel, adaptive): Not compatible with
requested type: [type=NULL; target=double].

An example:

library(GWmodel)

data(LondonHP)

dist <- gw.dist(coordinates(londonhp))

ab_gwr <- gwr.multiscale(PURCHASE ~ FLOORSZ + PROF,
                         data = londonhp,
                         criterion = "dCVR",
                         kernel = "gaussian",
                         adaptive = FALSE,
                         var.dMat.indx = 2,
                         bws0 = c(100,
                                  100,
                                  100),
                         bw.seled = rep(T, 3),
                         dMats = list(dist,
                                      dist,
                                      dist),
                         parallel.method = "omp",
                         parallel.arg = "omp")

I am following the example from the package's PDF. Also, I tried with my
dataset and many different combinations (different number of covariates,
the dMats parameter, adaptive bandwidths etc etc).

-- 
Tziokas Nikolaos
Cartographer

Tel:(+44)07561120302
LinkedIn <http://linkedin.com/in/nikolaos-tziokas-896081130>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list