spINAR
spINAR: An R Package for Semiparametric and Parametric Estimation and Bootstrapping of Integer-Valued Autoregressive (INAR) Models - Published in JOSS (2024)
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
Scientific Fields
Repository
Semiparametric and parametric estimation and bootstrapping of integer-valued autoregressive (INAR) models.
Basic Info
Statistics
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 2
Topics
Metadata Files
README.md
spINAR
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
Authors
TU Dortmund University
TU Dortmund University
TU Dortmund University
TU Dortmund University
Tags
count data time series simulation semiparametric estimation parametric estimation penalization validation bootstrappingGitHub Events
Total
Last Year
Committers
Last synced: 5 months ago
Top Committers
| Name | 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
- Homepage: https://github.com/MFaymon/spINAR
- Documentation: http://cran.r-project.org/web/packages/spINAR/spINAR.pdf
- License: GPL (≥ 3)
-
Latest release: 0.2.0
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.5.0 depends
- checkmate >= 1.8.5 imports
- stats * imports
- 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
- actions/checkout v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v3 composite
- actions/upload-artifact v1 composite
- openjournals/openjournals-draft-action master composite
