-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
132 lines (101 loc) · 3.77 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# tsEMOS: Time Series based Ensemble Model Output Statistics
<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/tsEMOS)](https://CRAN.R-project.org/package=tsEMOS)
[![R-CMD-check](https://github.com/jobstdavid/tsEMOS/workflows/R-CMD-check/badge.svg)](https://github.com/jobstdavid/tsEMOS/actions)
[![version](https://img.shields.io/badge/version-0.2.0-green.svg?style=flat)](https://github.com/jobstdavid/tsEMOS)
<!-- badges: end -->
An R package for time series based extensions of Ensemble Model Output Statistics (EMOS) as described in the references.
It depends on the R-packages:
- [imputeTS](https://cran.r-project.org/web/packages/imputeTS/index.html): Time series missing value imputation.
- [rugarch](https://cran.r-project.org/web/packages/rugarch/index.html): Univariate GARCH models.
## Installation
You can install the development version from GitHub with:
``` r
# install.packages("remotes")
remotes::install_github("jobstdavid/tsEMOS")
```
## Package overview
Below is an overview of all functions contained in the R-package for model estimation and prediction:
- ``semos``: smooth EMOS (SEMOS).
- ``dar_semos``: deseasonalized autoregressive smooth EMOS (DAR-SEMOS).
- ``dargarchmult_semos``: multiplicative deseasonalized autoregressive smooth EMOS with generalized autoregressive conditional heteroscedasticity (DAR-GARCH-SEMOS ($\cdot$)).
- ``dargarchadd_semos``: additive deseasonalized autoregressive smooth EMOS with generalized autoregressive conditional heteroscedasticity (DAR-GARCH-SEMOS (+)).
- ``sar_semos``: standardized autoregressive smooth EMOS (SAR-SEMOS).
## Example
### Load R-package and data
```{r example1}
# load package
library(tsEMOS)
# load data for station Hannover
data(station)
# select data for lead time 24 hours
data <- station[station$lt == 24, ]
# split data in training and test data
train <- data[data$date <= as.Date("2019-12-31"), ]
test <- data[data$date > as.Date("2019-12-31"), ]
```
### SEMOS
```{r example2}
fit <- semos(train = train,
test = test,
doy_col = 3,
obs_col = 9,
mean_col = 10,
sd_col = 11,
n_ahead = 0)
```
### DAR-SEMOS
```{r example3}
fit <- dar_semos(train = train,
test = test,
doy_col = 3,
obs_col = 9,
mean_col = 10,
sd_col = 11,
n_ahead = 0)
```
### DAR-GARCH-SEMOS ($\cdot$)
```{r example4}
fit <- dargarchmult_semos(train = train,
test = test,
doy_col = 3,
obs_col = 9,
mean_col = 10,
sd_col = 11,
n_ahead = 0)
```
### DAR-GARCH-SEMOS (+)
```{r example5}
fit <- dargarchadd_semos(train = train,
test = test,
doy_col = 3,
obs_col = 9,
mean_col = 10,
sd_col = 11,
n_ahead = 0)
```
### SAR-SEMOS
```{r example6}
fit <- sar_semos(train = train,
test = test,
doy_col = 3,
obs_col = 9,
mean_col = 10,
sd_col = 11,
n_ahead = 0)
```
## Contact
Feel free to contact [[email protected]](mailto:[email protected]) if you have any questions or suggestions.
## References
Jobst, D., Möller, A., and Groß, J. (2024). Time Series based Ensemble Model Output Statistics for Temperature Forecasts Postprocessing. https://doi.org/10.48550/arXiv.2402.00555.