Skip to content
hspm needs insight (through sphet → spatialreg → marginaleffects), which CRAN will archive unless its check problems are fixed by Nov 14.

Heterogeneous Spatial Models

0packages depend
2.6Kdownloads / year
–test coverage
13/13flavors OK

Overview

About

Spatial heterogeneity can be specified in various ways. 'hspm' is an ambitious project that aims at implementing various methodologies to control for heterogeneity in spatial models. The current version of 'hspm' deals with spatial and (non-spatial) regimes models. In particular, the package allows to estimate a general spatial regimes model with additional endogenous variables, specified in terms of a spatial lag of the dependent variable, the spatially lagged regressors, and, potentially, a spatially autocorrelated error term. Spatial regime models are estimated by instrumental variables and generalized methods of moments (see Arraiz et al., (2010) doi:10.1111/j.1467-9787.2009.00618.x, Bivand and Piras, (2015) doi:10.18637/jss.v063.i18, Drukker et al., (2013) doi:10.1080/07474938.2013.741020, Kelejian and Prucha, (2010) doi:10.1016/j.jeconom.2009.10.025).

Install

Health

CRAN checks
13OK
Slowest check: 2.6 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.1
READMENoVignettesNoNEWSNoCitation fileNoWebsitenot declared in DESCRIPTION
Description cites a JSS article
Help pages
6
Examples that run
100%3 run in a plain check
Exported functions with examples
100%
Documented parameters
97%
Return-value docs
100%
Help pages citing references
17%

Downloads

2.6K
CRAN downloads in the past year
Rank #18,736 · ~7/day · ~215/mo
Daily download trend is not available in this view yet.
26130 days
70390 days
2.6K1 year
Compare downloads with other packages →
Also on78 r2u4 autocran

Repository

5Stars
3Forks
0Open issues
0Open PRs
0Releases
38Commits
2Commit identities
38 commits · Last activity 2023-11-07 · Default branch at 1.1-5, ahead of CRAN 1.1 (checked 2026-10-21)
Responsiveness
How these are sampled
PRs merged (all time)
67%
Median days to close, 50 most recently updated closed issues
not measured
Median days to close, 50 most recently updated closed PRs
1
PracticesBeta

1 development-tooling and community-health practice detected across 1 family in the upstream repository

Checks run against github.com/gpiras/hspm on 2026-10-21.

Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)

Installing hspm adds 37 packages (23 with compiled code, 66 MB of source tarballs). Heaviest: stringi 11 MB, sf 9.3 MB, TH.data 8.2 MB.

Depends (1)
R >= 4.0
Imports (5)
LinkingTo (0)
none
Suggests (1)
Enhances (0)
none
Dependencies facing archival

CRAN will archive these unless their check problems are fixed by the date shown. This package needs each one to install.

Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (2)
Author, Maintainer since 1.0-0 (2022)
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 1.1Latest
    record
    2023-03-08 · current release · diff ↗
  • 1.0-0
    record
    2022-11-18
  • R
    R 4.2.0 released · 2022-04-22

Package metadata

First published
2022-11-18
Total releases
2 / 4 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 4.0
Bundled data
974 KB / 3 files
Download size
1.0 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("hspm")
Piras, G., & Sarrias, M. (2023). hspm: Heterogeneous Spatial Models (Version 1.1) [Computer software]. https://doi.org/10.32614/CRAN.package.hspm

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for hspm version 1.1 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy