https://github.com/svazzole/sparsevar
R package for sparse VAR estimation
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 4 DOI reference(s) in README -
✓Academic publication links
Links to: plos.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.7%) to scientific vocabulary
Keywords
Repository
R package for sparse VAR estimation
Basic Info
- Host: GitHub
- Owner: svazzole
- License: gpl-2.0
- Language: R
- Default Branch: master
- Size: 3.74 MB
Statistics
- Stars: 11
- Watchers: 4
- Forks: 9
- Open Issues: 2
- Releases: 0
Topics
Metadata Files
README.md
Sparse VAR (sparsevar)
Some R functions useful to estimate sparse VAR / VECM models.
Installation
To install the stable version from CRAN:
r
install.package("sparsevar")
To install the developing version:
r
install.packages("devtools")
devtools::install_github("svazzole/sparsevar", "master")
Check here to understand which are the dependencies of devtools for your OS.
Quick start
To load the sparsevar package simply type
r
library(sparsevar)
Using the function included in the package, we simply generate a 20x20 VAR(2) process
r
set.seed(1)
sim <- simulateVAR(N = 20, p = 2)
This command will generate a model with two sparse matrices with 5% of non-zero entries and a Toeplitz variance-covariance matrix with rho = 0.5.
We can estimate the matrices of the process using for example
r
fit <- fitVAR(sim$series, p = 2, threshold = TRUE)
The results can be seen by plotting the two var objects
r
plotVAR(sim, fit)
the first row of the plot is made by the matrices of the simulated process and the second row is formed by their estimates.
The fit contains also the estimate of the variance/covariance matrix of the residuals
r
plotMatrix(fit$sigma)
which can be compared with the covariance matrix of the errors of the generating process
r
plotMatrix(sim$sigma)
Usage
The functions included for model estimation are:
fitVAR: to estimate a sparse VAR multivariate time series with ENET, SCAD or MC+;fitVARX: to estimate a sparse VAR-X model using ENET;fitVECM: to estimate a sparse VECM (Vector Error Correction Model) using LS with penalty (again: ENET, SCAD or MC+);impulseResponse: compute the impulse response function;errorBands: estimate the error bands for the IRF (using bootstrap).
For simulations:
simulateVAR: to generate a sparse VAR multivariate time series;simulateVARX: to generate a sparse VARX time series;createSparseMatrix: used to create sparse matrices with a given density.
For plotting:
plotMatrix: useful to plot matrices and sparse matrices;plotVAR: plot all the matrices of the model or models in input;plotIRF: plot IRF function;plotGridIRF: multiple plots of IRF.
Papers using sparsevar
[1] Gibbons SM, Kearney SM, Smillie CS, Alm EJ (2017) Two dynamic regimes in the human gut microbiome. PLoS Comput Biol 13(2): e1005364.
[2] Quentin Guibert, Olivier Lopez, Pierrick Piette, Forecasting mortality rate improvements with a high-dimensional VAR, Insurance: Mathematics and Economics, Volume 88, 2019, Pages 255-272, ISSN 0167-6687.
References
[1] Basu, Sumanta; Michailidis, George. Regularized estimation in sparse high-dimensional time series models. Ann. Statist. 43 (2015), no. 4, 1535--1567. doi:10.1214/15-AOS1315.
[2] Lütkepohl, Helmut. New Introduction to Multiple Time Series Analysis. Springer Science & Business Media, 2005, ISBN 3540277528.
Owner
- Name: SV
- Login: svazzole
- Kind: user
- Location: Italy
- Company: #tothemoon
- Repositories: 3
- Profile: https://github.com/svazzole
[N]Ever tried. [N]Ever failed. No matter [?]. [Do not] Try Again. [Do not] Fail again. [Do not] Fail better. Wat?
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 287
- Total Committers: 3
- Avg Commits per committer: 95.667
- Development Distribution Score (DDS): 0.028
Top Committers
| Name | Commits | |
|---|---|---|
| Simone Vazzoler | s****e@g****m | 279 |
| SV | s****e@u****m | 6 |
| Pierrick Piette | p****e@g****m | 2 |
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 5
- Total pull requests: 1
- Average time to close issues: 3 months
- Average time to close pull requests: 8 days
- Total issue authors: 5
- Total pull request authors: 1
- Average comments per issue: 3.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- 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
- seangibbons (1)
- mgorjis (1)
- lm2613 (1)
- SebKrantz (1)
- miryo87s (1)
Pull Request Authors
- PierrickPiette (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 279 last-month
- Total docker downloads: 43,390
- Total dependent packages: 3
- Total dependent repositories: 1
- Total versions: 7
- Total maintainers: 1
cran.r-project.org: sparsevar
Sparse VAR/VECM Models Estimation
- Homepage: https://github.com/svazzole/sparsevar
- Documentation: http://cran.r-project.org/web/packages/sparsevar/sparsevar.pdf
- License: GPL-2
- Status: removed
-
Latest release: 0.1.0
published almost 5 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.5.0 depends
- Matrix * imports
- corpcor * imports
- doParallel * imports
- ggplot2 * imports
- glmnet * imports
- grid * imports
- mvtnorm * imports
- ncvreg * imports
- parallel * imports
- picasso * imports
- reshape2 * imports
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests