rgwrspgwr

How to obtain standard errors of local regression coefficients in spgwr::ggwr()?


I am using spgwr::ggwr() to fit generalized geographically weighted regression with Poisson model and log-link function. The results provide local coefficient estimates, but i am missing how to get their standard errors (or t statistics) to compute pseudo p-values.

Below is a toy example using SpatialEpi::NYleukemia dataset:

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)

Is there any way i can get standard errors of the coefficients?

Thanks!


Solution

  • You may obtain standard errors from local coefficients running the function GWmodel::ggwr.basic. Function spgwr::ggwr() returns coefficients but no standard errors.