1

我正在R使用该spgwr库进行地理加权回归 (GWR)。我知道可以使用 检索每个观察值的局部系数和标准误差gwr_fit$SDF

现在我如何使用这些信息来确定哪些局部系数具有统计显着性,以便我可以将它们绘制在地图上?

可重现的例子

library(spgwr)
library(UScensus2000tract)
library(parallel)

# load data
  data("oregon.tract")


# calculate Optimal kernel bandwidth
  GWRbandwidth <- gwr.sel( log(med.age) ~ log(white) + log(black), data=oregon.tract, adapt=T)

# detect number of CPU cores to go parallel
  no_cores <- detectCores() - 1 # Calculate the number of cores
  cl <- makeCluster(no_cores)# Initiate cluster 

# run GWR Model
  gwr_fit <- gwr( log(med.age) ~ log(white) + log(black), data=oregon.tract, adapt= GWRbandwidth, hatmatrix=TRUE, se.fit=TRUE, cl=cl)


# return Sp object with coefficients and standard errors
  df <- gwr_fit$SDF  
4

0 回答 0