I am currently trying to estimate a mixed Geographically Weighted Regression (GWR) model by using the R package 'GWmodel'. It works well when I estimate a Multi-Scale GWR by using 'gwr.multiscale', but I get the following error message when I try to estimate the mixed GWR via 'gwr.mixed' function.
### Choose a bandwidth by minimizing the AICc
bw.exp.aic <- bw.gwr(mod, data=GWR.db, approach="AIC", kernel="exponential", adaptive=TRUE, dMat=dm.calib, longlat=TRUE)
class(mix.db)
[1] "SpatialPointsDataFrame"
attr(,"package")
[1] "sp"
mod
spec.imb ~ great_upsk_need + slack_rate_15_64 + ec_act_rate_F_15_64 +
GVA_J_share + GERD_GDP + comp_empl
fix.var1
[1] "slack_rate_15_64" "ec_act_rate_F_15_64" "GERD_GDP"
mix.gwr.exp <- gwr.mixed(mod, data=mix.db, bw=bw.exp.aic, kernel="exponential", fixed.vars=fix.var1, intercept.fixed=TRUE, adaptive=TRUE, dMat=dm.calib, longlat=TRUE, diagnostic=TRUE)
Errore in dimnames(x) <- dn : la lunghezza di 'dimnames' [2] non corrisponde con l'estensione dell'array`
I have already tried to set the argument intercept.fixed=FALSE
and to change the vector of fixed variables, the bandwidth, and the kernel function. So, I am really not able to understand where the problem is.