I am running a GWR model from the library spgwr
, in R, and when I try to see the significant variables by using the function LMZ.F3GWR.test()
I get the following error:
Error in solve.default(t(x) %*% diag(wj) %*% x) : system is computationally singular: reciprocal condition number = 6.21142e-21
Apparently, there is nothing wrong with the assumption on my data, there is no collinearity, all variables are scaled and no missing data. I am really lost about what is going on.
My data consists of Brazilian mortality rates as a response variable and continous data as predictors. My code for the GWR model is:
df_mun_spatial = as(DATA, "Spatial")
bw <- gwr.sel(alias(modelo)$Model,
data=df_mun_spatial, adapt = TRUE, gweight = gwr.bisquare)
gwr.model = gwr(alias(modelo)$Model,
data = df_mun_spatial,
adapt=bw,
gweight = gwr.Gauss,
hatmatrix=TRUE,
se.fit=TRUE)
And I get no errors at all. Is there a way to avoid this and use the function to get the p-values of statistically significant variables?