【问题标题】:How to obtain standard errors of local regression coefficients in spgwr::ggwr()?如何在 spgwr::ggwr() 中获取局部回归系数的标准误差?
【发布时间】:2021-06-05 00:24:16
【问题描述】:

我正在使用spgwr::ggwr() 来拟合具有泊松模型和对数链接函数的广义地理加权回归。结果提供了局部系数估计值,但我缺少如何获得它们的标准误差(或 t 统计量)来计算伪 p 值。

以下是使用SpatialEpi::NYleukemia 数据集的玩具示例:

library(SpatialEpi)
library(spgwr)

## Load data
data(NYleukemia)
population <- NYleukemia$data$population
cases <- ceiling(NYleukemia$data$cases * 100)
centroids <- latlong2grid(NYleukemia$geo[, 2:3])

# data frame
nyleuk <- data.frame(centroids, cases, population) 

# set coordinates as vector
coordny <- cbind(centroids[,1],centroids[,2])

# set a kernel bandwidth
bw <- 0.5

# fit ggwr()
m_pois <- ggwr(cases ~ offset(log(population)),
               data = nyleuk, gweight = gwr.Gauss, 
               adapt = bw, family = poisson(link="log"),  
               type="working", coords = coordny) 

# returns spatial point with coefficients 
# but no standard errors :(
head(m_pois$SDF@data)

有什么办法可以得到系数的标准误?

谢谢!

【问题讨论】:

    标签: r gwr spgwr


    【解决方案1】:

    您可以从运行函数GWmodel::ggwr.basic 的局部系数中获得标准误差。函数spgwr::ggwr() 返回系数但没有标准误差。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-05-15
      • 2018-07-07
      • 1970-01-01
      • 1970-01-01
      • 2012-10-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多