Science Score: 13.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
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.7%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Forecast Linear Augmented Projection
Basic Info
Statistics
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
- Releases: 1
Created over 2 years ago
· Last pushed about 2 years ago
Metadata Files
Readme
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# flap
[](https://CRAN.R-project.org/package=flap)
[](https://github.com/FinYang/flap/actions/workflows/R-CMD-check.yaml)
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
The goal of `flap` is to provide the Forecast Linear Augmented Projection method that can reduce forecast error variance by adjusting the forecasts of multivariate time series to be consistent with the forecasts of linear combinations (components) of the series by projecting all forecasts onto the space where the linear constraints are satisfied.
## Installation
You can install the **stable** version from
[CRAN](https://cran.r-project.org/package=flap).
``` r
install.packages("flap")
```
You can install the **development** version from
[Github](https://github.com/FinYang/flap)
``` r
# install.packages("remotes")
remotes::install_github("FinYang/flap")
```
## Example
This is a basic workflow to flap:
```{r example}
## The following pacakges are required to run this example
# install.packages("tidyr")
# install.packages("ggplot2")
# install.packages("forecast")
# install.packages("fpp2")
library(flap)
library(tidyr)
library(ggplot2)
# Obtain the forecast and the residual of the original series
mdl <- apply(fpp2::visnights, 2, forecast::ets)
fc <- vapply(mdl, function(mdl) forecast::forecast(mdl, h=12)$mean,
FUN.VALUE = numeric(12))
res <- vapply(mdl, residuals,
FUN.VALUE = numeric(nrow(fpp2::visnights)))
# Obtain components and their forecasts and residuals
pca <- stats::prcomp(fpp2::visnights, center = FALSE, scale. = FALSE)
mdl_comp <- apply(pca$x, 2, forecast::ets)
fc_comp <- vapply(mdl_comp, function(mdl) forecast::forecast(mdl, h=12)$mean,
FUN.VALUE = numeric(12))
res_comp <- vapply(mdl_comp, residuals,
FUN.VALUE = numeric(nrow(pca$x)))
Phi <- t(pca$rotation)
# flap!
proj_fc <- flap(fc, fc_comp, Phi, res, res_comp)
proj_fc
# Plot
if(interactive()) {
proj_fc %>%
as.data.frame() %>%
pivot_longer(!c(h, p)) %>%
ggplot(aes(x = h, y = value, colour = p, group = p)) +
geom_line() +
facet_wrap("name", scales = "free_y")
}
```
Owner
- Name: Fin
- Login: FinYang
- Kind: user
- Location: Melbourne, Australia
- Company: Monash University
- Website: https://yangzhuoranyang.com
- Repositories: 2
- Profile: https://github.com/FinYang
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total 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
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
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 219 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: flap
Forecast Linear Augmented Projection
- Homepage: https://github.com/FinYang/flap
- Documentation: http://cran.r-project.org/web/packages/flap/flap.pdf
- License: GPL (≥ 3)
-
Latest release: 0.2.0
published about 2 years ago
Rankings
Dependent packages count: 28.1%
Forks count: 28.3%
Stargazers count: 35.2%
Dependent repos count: 36.1%
Average: 42.5%
Downloads: 85.0%
Maintainers (1)
Last synced:
11 months ago
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v4 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
DESCRIPTION
cran
- corpcor * imports
- utils * imports
- forecast * suggests
- stats * suggests