Facebook Prophet uses fourier series to model seasonality, see page 11 of the paper and codes here.
arima.sim
ARMAtoMA
ARMAacf
arima
\[ x_t = 0.3 x_{t-1} + 0.4 x_{t-2} + w_t \]
ARMAtoMA(ar = c(0.3, 0.4), lag.max = 10)
## [1] 0.30000000 0.49000000 0.26700000 0.27610000 0.18963000 0.16732900
## [7] 0.12605070 0.10474681 0.08184432 0.06645202
arima.sim(list(ar=c(0.3, 0.4)), n=20)
## Time Series:
## Start = 1
## End = 20
## Frequency = 1
## [1] -0.01797661 -1.11991995 0.57636110 -0.70021934 -1.63126203 -1.42651552
## [7] -1.72887215 -1.26875589 -1.53681545 -1.42670021 -1.41653085 -0.85675832
## [13] -0.02797402 0.89296372 0.02224423 2.01430315 -0.75946986 1.56861608
## [19] -0.07702682 0.70459973
arima.sim(list(ar=c(0.3, 0.4)), n=20)
## Time Series:
## Start = 1
## End = 20
## Frequency = 1
## [1] 0.40912563 2.06147011 0.83652423 1.69220949 0.09388694 -0.11668507
## [7] -0.09720097 0.16060261 -1.04036919 1.28772970 -0.64542560 -0.26330784
## [13] 0.53043143 0.72411573 -0.21856670 -0.17762137 -0.10322994 -0.08619931
## [19] -0.94847818 -1.56716754
ACF = ARMAacf(ar=c(0.3, 0.4), lag.max = 10)
plot(ACF, type="h", xlab="lag", ylim = c(0.0, 1.0))
abline(h=0)
ACF = ARMAacf(ar=c(0.3, -0.4), lag.max = 10)
plot(ACF, type="h", xlab="lag", ylim = c(-1.0, 1.0))
abline(h=0)
ACF = ARMAacf(ma=c(0.1, 0.2), lag.max = 10)
plot(ACF, type="h", xlab="lag")
abline(h=0)
x = arima.sim(list(ar=c(0.3, 0.4)), n=1000)
arima(x, order=c(2,0,0))
##
## Call:
## arima(x = x, order = c(2, 0, 0))
##
## Coefficients:
## ar1 ar2 intercept
## 0.2668 0.3921 0.0525
## s.e. 0.0292 0.0292 0.0937
##
## sigma^2 estimated as 1.027: log likelihood = -1432.57, aic = 2873.14
MA(1) has ACF \[ \begin{aligned} \rho(h=1) &= \frac{\theta_1}{1+\theta_1^2} \\ \rho(h>1) &= 0 \\ \end{aligned} \] Show \(\frac{\theta_1}{1+\theta_1^2} \leq \frac12\) for all \(\theta_1 \in \mathbb{R}\).
Factorize polynomial \(1-0.8z+0.15z^2\).