Acf
(correlogram) of the residuals (error) shows non-zero correlations, then:%pylab inline
%load_ext rmagic
%R library(forecast)
Populating the interactive namespace from numpy and matplotlib The rmagic extension is already loaded. To reload it, use: %reload_ext rmagic
This is forecast 4.8
State Model
tion of observations measured over time. It is assumed that the dynamic properties cannot be observed directly from the data. The unobserved dynamic process at time t is referred to as the state of the time series.
Local Level Model
level
component is allowed to vary in timewhere $\mu_t$ is the unobserved level at time t, and $\epsilon_t$ (irregular part) is the observation disturbance at time t, and $\xi_t$ is what is called the level disturbance at time t.
In other words, the hidden state is modelled as a random variable
Local Linear Tread Model $$y_t = \mu_t + \epsilon_t, \ \epsilon_t \sim N(0, \sigma_{\epsilon}^2)$$ $$\mu_{t+1} = \mu_t + \nu_t + \xi_t, \ \xi_t \sim N(0, \sigma_{\xi}^2)$$ $$\nu_{t+1} = \nu_t + \zeta_t, \ \zeta_t \sim N(0, \sigma_{\zeta}^2)$$ so the local linear trend model contains two state equations, one for modelling the level, and one for modelling the slope. In the literature on time series analysis, the slope is also referred to as the drift.