Giter Club home page Giter Club logo

hgwrr's Introduction

hgwrr

CRAN Documentation R Package Check

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

  • Hu, Yigong, Lu, Binbin, Ge, Yong, Dong, Guanpeng, 2022. Uncovering spatial heterogeneity in real estate prices via combined hierarchical linear model and geographically weighted regression. Environment and Planning B: Urban Analytics and City Science. DOI
  • Yigong Hu, Richard Harris, Richard Timmerman, and Binbin Lu. A Hierarchical and Geographically Weighted Regression Model and Its Backfitting Maximum Likelihood Estimator (Short Paper). In 12th International Conference on Geographic Information Science (GIScience 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 277, pp. 39:1-39:6, Schloss Dagstuhl – Leibniz-Zentrum fĂźr Informatik (2023) DOI

hgwrr's People

Contributors

hpdell avatar

Watchers

 avatar

hgwrr's Issues

A vignette?

Is it possible and good to include a vignette in the R package?

incorrect use of RcppArmadillo / Armadillo within R environment

@HPDell The hgwrr package for R incorrectly uses the armadillo header within R environment.

The hgwrr package erroneously includes the <armadillo> header instead of <RcppArmadillo.h> in several places:

<RcppArmadillo.h> is a wrapper around <armadillo>, and configures armadillo internals for compatibility with the R environment.

By not including <RcppArmadillo.h>, the hgwrr package ends up using an "unconfigured" instance of armadillo. This leads to problems like the use of std::cerr.

Additionally, the hgwrr package defines ARMA_NO_DEBUG, which was always risky and ill-advised. Newer versions of Armadillo ignore the old ARMA_NO_DEBUG macro.

Related issue: RcppCore/RcppArmadillo#446

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.