spINAR

spINAR: An R Package for Semiparametric and Parametric Estimation and Bootstrapping of Integer-Valued Autoregressive (INAR) Models - Published in JOSS (2024)

https://github.com/mfaymon/spinar

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 17 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    3 of 5 committers (60.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

bootstrapping count-data parametric-estimation penalization semiparametric-estimation simulation time-series validation

Scientific Fields

Economics Social Sciences - 40% confidence
Last synced: 4 months ago · JSON representation

Repository

Semiparametric and parametric estimation and bootstrapping of integer-valued autoregressive (INAR) models.

Basic Info
  • Host: GitHub
  • Owner: MFaymon
  • License: gpl-3.0
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 5.01 MB
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • Open Issues: 1
  • Releases: 2
Topics
bootstrapping count-data parametric-estimation penalization semiparametric-estimation simulation time-series validation
Created over 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Code of conduct

README.md

spINAR

DOI CRAN R build status codecov DOI

Semiparametric and Parametric Estimation and Bootstrapping of Integer-Valued Autoregressive (INAR) Models.

The package provides flexible simulation of INAR data using a general pmf to define the innovations' distribution. It allows for semiparametric and parametric estimation of INAR models and includes a small sample refinement for the semiparametric setting. Additionally, it provides different procedures to appropriately bootstrap INAR data.

Citation

Please cite the JOSS paper using the BibTeX entry ``` @article{faymonville2024spinar, doi = {10.21105/joss.05386}, url = {https://doi.org/10.21105/joss.05386}, year = {2024}, publisher = {The Open Journal}, volume = {9}, number = {97}, pages = {5386}, author = {Maxime Faymonville and Javiera Riffo and Jonas Rieger and Carsten Jentsch}, title = {{spINAR}: An {R} Package for Semiparametric and Parametric Estimation and Bootstrapping of Integer-Valued Autoregressive ({INAR}) Models}, journal = {Journal of Open Source Software} }

` which is also obtained by the callcitation("spINAR")``.

References (related to the methodology)

  • Faymonville, M., Jentsch, C., Weiß, C.H. and Aleksandrov, B. (2022). "Semiparametric Estimation of INAR Models using Roughness Penalization". Statistical Methods & Applications. DOI
  • Jentsch, C. and Weiß, C.H. (2017), “Bootstrapping INAR Models”. Bernoulli 25(3), pp. 2359-2408. DOI
  • Drost, F., Van den Akker, R. and Werker, B. (2009), “Efficient estimation of auto-regression parameters and inovation distributions for semiparametric integer-valued AR(p) models”. Journal of the Royal Statistical Society. Series B 71(2), pp. 467-485. DOI

Contribution

This R package is licensed under the GPLv3. For bug reports (lack of documentation, misleading or wrong documentation, unexpected behaviour, ...) and feature requests please use the issue tracker. Pull requests are welcome and will be included at the discretion of the author.

Installation

For installation of the development version use devtools:

r devtools::install_github("MFaymon/spINAR")

Structure

Example

r library(spINAR)

We simulate two datasets. The first consists of n = 100 observations resulting from an INAR(1) model with coefficient alpha = 0.5 and Poi(1) distributed innovations. The second consists of n = 100 observations from an INAR(2) model with coefficients alpha1 = 0.3, alpha2 = 0.2 and a pmf equal to (0.3, 0.3, 0.2, 0.1, 0.1).

```r set.seed(1234)

dat1 <- spinarsim(100, 1, alpha = 0.5, pmf = dpois(0:20,1)) dat2 <- spinarsim(100, 2, alpha = c(0.3, 0.2), pmf = c(0.3, 0.3, 0.2, 0.1, 0.1)) ```

We estimate an INAR(1) model on the first dataset.

```r

semiparametrically

spinar_est(dat1, 1)

parametrically (moment estimation, true Poisson assumption)

spinarestparam(dat1, 1, "mom", "poi") ```

We estimate an INAR(2) model on the second dataset.

```r

semiparametrically

spinar_est(dat2, 2) ```

For small samples, it can be beneficial to apply a penalized version of the semiparametric estimation. For illustration, we restrict ourselves to the first 50 observations of the first dataset and apply semiparametric, parametric and penalized semiparametric estimation. We choose a small L2 penalization as this showed to be most beneficial in the simulation study in Faymonville et al. (2022) (see references). Alternatively, one could also use the spinarpenalval function which validates the two penalization parameters.

r dat1_50 <- dat1[1:50] spinar_est(dat1_50, 1) spinar_est_param(dat1_50, 1, "mom", "poi") spinar_penal(dat1, 1, penal1 = 0, penal2 = 0.1)

Finally, we bootstrap INAR(1) data on the first data set. We perform a semiparametric and a parametric INAR bootstrap (moment estimation, true Poisson assumption).

r spinar_boot(dat1, 1, 500, setting = "sp") spinar_boot(dat1, 1, 500, setting = "p", type = "mom", distr = "poi")

Application

The file vignette.md provides reproduced results from the literature for each provided functionality of the spINAR package.

Outlook

A possible extension of the spINAR package is to not only cover INAR models but also the extension to GINAR (generalized INAR) models, see Latour (1997). This model class does not only cover the binomial thinning but also allows for other thinning operations, e.g. thinning using geometrically distributed random variables.

JOSS Publication

spINAR: An R Package for Semiparametric and Parametric Estimation and Bootstrapping of Integer-Valued Autoregressive (INAR) Models
Published
May 08, 2024
Volume 9, Issue 97, Page 5386
Authors
Maxime Faymonville
TU Dortmund University
Javiera Riffo
TU Dortmund University
Jonas Rieger
TU Dortmund University
Carsten Jentsch
TU Dortmund University
Editor
Claudia Solis-Lemus ORCID
Tags
count data time series simulation semiparametric estimation parametric estimation penalization validation bootstrapping

GitHub Events

Total
Last Year

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 311
  • Total Committers: 5
  • Avg Commits per committer: 62.2
  • Development Distribution Score (DDS): 0.579
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
MFaymon f****e@s****e 131
Javiera Riffo j****o@u****l 113
JonasRieger j****r@t****e 57
Javiera Riffo j****o@J****l 8
Maxime Faymonville f****e@f****e 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 2
  • Total pull requests: 3
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 2 days
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 4.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • wittenberg (1)
Pull Request Authors
  • jariffo (3)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 210 last-month
  • Total docker downloads: 21,613
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
cran.r-project.org: spINAR

(Semi)Parametric Estimation and Bootstrapping of INAR Models

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 210 Last month
  • Docker Downloads: 21,613
Rankings
Forks count: 21.9%
Stargazers count: 24.2%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 40.2%
Downloads: 89.7%
Last synced: 4 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.5.0 depends
  • checkmate >= 1.8.5 imports
  • stats * imports
.github/workflows/R-CMD-check.yml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/covr.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/draft-pdf.yml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v1 composite
  • openjournals/openjournals-draft-action master composite