确定R中GWR的统计学显着性结果

时间:2017-05-22 23:30:00

标签: r geospatial gwr spgwr

我使用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  

0 个答案:

没有答案