1

I'm using the R package "GWmodel" to do the logistic GWR, but this package doesn't provide the prediction function for generalized GWR(Binomial/Poisson). How can I do the Logistic GWR prediction using R? I've searched other R packages, but there were no good solutions.

Also, I tried to apply Python library “PySAL”, this library is, it seems, providing logistic GWR prediction. However, the difference of the bandwidths calculated by "PySAL" and "GWmodel" was too large(using the same dataset), and the bandwidth from "GWmodel" was more reasonable, so I'm still considering to work on R. I don't want to use GWR4 too.

1

Is the gwmodel$SDF object not populated? The model object should contain a SpatialPixelsDataFrame object with the model estimates.

It is very difficult to provide advice when you do not show us what you have done but, rather just state an opinion that may or many not be true.

I would image that the R predict function (generic for gwr.predict) allows for additional arguments to predict the log-likelihood or probabilities based on the same arguments used for gwr.basic. The argument family ="binomial" is likely just an argument passed to glm.

  • Thanks. What I want to do is to use Logistic GWR to train on a sample dataset and then to do the prediction on a new dataset. Not only to explore. As you suggested I've used gwr.basic (or ggwr), but how can I do the prediction based on the ggwr results? I'm just holding the point dataset not raster. – hiyu Aug 30 '17 at 22:51
  • Isn't that what the fit.points argument to spgwr::ggwr is for? – Spacedman Aug 31 '17 at 7:08
  • ggwr doesn't provide logistic GWR function for AICc (but CV) score, so I changed to use GWmodel. Also, I could not find the theory/algorithm for Logistic GWR prediction. Otherwise, I can code myself. – hiyu Sep 7 '17 at 5:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.