| season | R Documentation | 
Seasonal adjustment by state space modeling.
season(y, trend.order = 1, seasonal.order = 1, ar.order = 0, trade = FALSE,
       period = NULL, tau2.ini = NULL, filter = c(1, length(y)),
       predict = length(y), arcoef.ini = NULL, log = FALSE, log.base = "e",
       minmax = c(-1.0e+30, 1.0e+30), plot = TRUE, ...)
y | 
 a univariate time series with or without the tsp attribute.  | ||||||||||
trend.order | 
 trend order (0, 1, 2 or 3).  | ||||||||||
seasonal.order | 
 seasonal order (0, 1 or 2).  | ||||||||||
ar.order | 
 AR order (0, 1, 2, 3, 4 or 5).  | ||||||||||
trade | 
 logical; if   | ||||||||||
period | 
 If the tsp attribute of  
  | ||||||||||
tau2.ini | 
 initial estimate of variance of the system noise   | ||||||||||
filter | 
 a numerical vector of the form   | ||||||||||
predict | 
 the end position of prediction (  | ||||||||||
arcoef.ini | 
 initial estimate of AR coefficients (for   | ||||||||||
log | 
 logical. If   | ||||||||||
log.base | 
 the letter "e" (default) or "10" specifying the base of logarithmic transformation. Valid only if log = TRUE.  | ||||||||||
minmax | 
 lower and upper limits of observations.  | ||||||||||
plot | 
 logical. If   | ||||||||||
... | 
 graphical arguments passed to   | 
An object of class "season", which is a list with the following
components:
tau2 | 
 variance of the system noise.  | 
sigma2 | 
 variance of the observational noise.  | 
llkhood | 
 log-likelihood of the model.  | 
aic | 
 AIC of the model.  | 
trend | 
 trend component (for   | 
seasonal | 
 seasonal component (for   | 
arcoef | 
 AR coefficients (for   | 
ar | 
 AR component (for   | 
day.effect | 
 trading day effect (for   | 
noise | 
 noise component.  | 
cov | 
 covariance matrix of smoother.  | 
For time series with the tsp attribute, set frequency to
period.
Kitagawa, G. (2020) Introduction to Time Series Modeling with Applications in R. Chapman & Hall/CRC.
# BLSALLFOOD data
data(BLSALLFOOD)
season(BLSALLFOOD, trend.order = 2, seasonal.order = 1, ar.order = 2)
season(BLSALLFOOD, trend.order = 2, seasonal.order = 1, ar.order = 2,
       filter = c(1, 132))
# Wholesale hardware data
data(WHARD)
season(WHARD, trend.order = 2, seasonal.order = 1, ar.order = 0, trade = TRUE,
       log = TRUE)
season(WHARD, trend.order = 2, seasonal.order = 1, ar.order = 0, trade = TRUE,
       filter = c(1, 132), log = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.