trend {TSSS} | R Documentation |
Estimate the trend by state space model.
trend(y, trend.order = 1, tau2.ini = NULL, delta, plot = TRUE, ...)
y |
a univariate time series. |
trend.order |
trend order. |
tau2.ini |
initial estimate of variance of the system noise τ^2.
If |
delta |
search width (for |
plot |
logical. If |
... |
further arguments to be passed to plot.trend. |
The trend model can be represented by a state space model
x(n) = F * x(n-1) + G * v(n),
y(n) = H * x(n) + w(n),
where F, G and H are matrices with appropriate dimensions. We assume that v(n) and w(n) are white noises that have the normal distributions N(0,τ^2) and N(0, σ^2), respectively.
An object of class "trend"
, which is a list with the following
elements:
trend |
trend component. |
residual |
residuals. |
tau2 |
variance of the system noise τ^2. |
sigma2 |
variance of the observational noise σ^2. |
llkhood |
log-likelihood of the model. |
aic |
AIC. |
Kitagawa, G. (2010) Introduction to Time Series Modeling. Chapman & Hall/CRC.
# The daily maximum temperatures for Tokyo data(Temperature) trend(Temperature, trend.order = 1, tau2.ini = 0.223, delta = 0.001) trend(Temperature, trend.order = 2)