[R-sig-Geo] GWmodel model.selection.gwr "Input Are Not Correct" Error
Kristin Graves
kristin.graves at gmail.com
Sun Jan 11 23:51:12 CET 2015
Hello -
I am an R newbie trying to run the model.selection.gwr function in GWmodel,
and am receiving the following error message:
Error in model.selection.gwr(DeVar = kwh_val, InDeVars = gwr_iv, data =
gwr_spdf, :
Input are not correct, please recheck!
The error message doesn't provide much info - can anyone provide any hints
or suggestions? Thanks in advance!
Here is the statement I am running:
gwr_mod<-model.selection.gwr(DeVar=kwh_val, InDeVars=gwr_iv, data=gwr_spdf,
+ bw=gwr_bw, approach="AIC", adaptive=TRUE,
kernel="gaussian",
+ dMat=gwr_distmat, longlat=FALSE)
kwh_val is a column in the gwr_spdf spatial points data frame.
Here is the structure of my independent variable matrix gwr_iv:
> str(gwr_iv)
num [1:255, 1:5] 18320 41544 22240 51246 100422 ...
- attr(*, "dimnames")=List of 2
..$ : NULL
..$ : chr [1:5] "annkwh" "cons_mo_val" "dmd_mo_val" "bldg_area" ...
Here is the structure of the bandwidth gwr_bw, created by the bw.gwr
function
> str(gwr_bw)
num 37
Here is the structure of the distance matrix gwr_distmat, created by the
gw.dist function
> str(gwr_distmat)
num [1:255, 1:255] 0 0.05093 0.04972 0.04642 0.00943 ...
Kristin Graves
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list