find_opt | R Documentation |
Searches through the model space to identify the best number of trigonometric variables, with the lowest AIC, AICc or BIC value.
find_opt(
x,
dates,
H = NULL,
AO = NULL,
method = "additive",
l.max = 12,
k.max = 42,
by = 6
)
x |
Numeric vector. Time series to seasonally adjust |
dates |
a vector of class "Date", containing the data dates |
H |
(optional) Matrix with holiday and trading day variables |
AO |
(optional) Matrix with additive outlier variables |
method |
Decomposition method: "additive" or "multiplicative". By default uses the additive method |
l.max |
Maximal number of the monthly cycle variables to search for. By default is 12 |
k.max |
Maximal number of the yearly cycle variables to search for. By default is 42 |
by |
Step size in the search. By default is 6. |
list with the optimal number of (yearly and monthly) fourier variables according to AIC, AICc and BIC
data(gasoline.data)
res=find_opt(x=gasoline.data$y,dates=gasoline.data$date)
print(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.