I have been trying to use the function ggwr.basic from the GWmodel package in R for a few days. I need to adjust a gwr binomial model for some data so I am using ggwr.basic(). The package is apparently well installed and loaded before calling the function, but when I invoke ggwr.basic() I get the following error message:
Error: could not find function "ggwr.basic"
I am able to use other functions from the package or even call help(ggwr.basic) and access the help section of the funcion.
Just to be as clear as possible I am using R 64-bit version 3.3.1 and GWmodel 2.0.1.
Here is the example code I am using:
##install.packages('GWmodel')
library(GWmodel)
data(LondonHP)
DM<-gw.dist(dp.locat=coordinates(londonhp))
bw.f2 <- bw.ggwr(BATH2~FLOORSZ,data=londonhp, dMat=DM,family ="binomial")
res.binomial<-ggwr.basic(BATH2~FLOORSZ, bw=bw.f2,data=londonhp, dMat=DM, family ="binomial")
Does anyone know if this is a common error am I doing something wrong??
Thanks!!
This is actually a problem with the package.
ggwr.basic
is mentioned in the docs however it is not exported. You should contact Binbin Lu [email protected] on this.However, this works:
You can also use the
gwr.binomial()
function.This may have just been a typo in the docs, wherein he meant to refer to the functions above. However, you should check with him. Even if it was just a typo, he should fix it.