hgwrr

This package is provides R interfaces to calibrate the Hierarchical and Geographically Weighted Regression (HGWR) model.

Installation

The package now is on CRAN.

install.packages("hgwrr")

If you want to install the latest version from GitHub, note that the packages relies on a submodule from hpdell/hgwr. So install_github() from the devtools package is probably not working. Instead, it's better to recursively clone the package.

git clone --recursive https://github.com/hpdell/hgwrr
R CMD INSTALL hgwrr

Basic Usage

Here is a quick example showing how it works.

library(hgwrr)
data(multisampling)
hgwr(
  formula = y ~ L(g1 + g2) + x1 + (z1 | group),
  data = multisampling$data,
  coords = multisampling$coords,
  bw = 10
)

For further information, please read this article. There is a full example.

Reference