Unit 21 Forecasting
Some helpers:
tswgen <- function(n, sn = 0) {
sig <- function(...) {
gen.sigplusnoise.wge(n = n, ..., sn = sn)
}
ari <- function(..., dif) {
gen.arima.wge(n = n, ..., sn = sn)
}
aru <- function(...) {
gen.aruma.wge(n = n, ..., sn = sn)
}
arma <- function(...) {
gen.arma.wge(n = n, ..., sn = sn)
}
list(sig = sig, ari = ari, aru = aru, arma = arma)
}
21.1 Forecasts from Signal-Plus-Noise
\[X_t = s_t + Z_t\] Where:
- \(s_t\) is a deterministic signal
- \(Z_t\) is a zero-mean, stationary process
Examples:
\(s_t = a + b t\) is a linear signal
\(s_t = a + b t + c t^2\) is a quadratic signal
\(s_t = \cos \left(2 \pi f t + C \right)\)