find_opt {boiwsa} | R Documentation |
Find optimal number of fourier variables
Description
Searches through the model space to identify the best number of trigonometric variables, with the lowest AIC, AICc or BIC value.
Usage
find_opt(
x,
dates,
H = NULL,
AO = NULL,
method = "additive",
l.max = 24,
k.max = 42,
by = 6
)
Arguments
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 |
k.max |
maximal number of the yearly cycle variables to search for |
by |
step size in the search |
Value
list with the optimal number of (yearly and monthly) fourier variables according to AIC, AICc and BIC
Examples
data(gasoline.data)
res=find_opt(x=gasoline.data$y,dates=gasoline.data$date)
print(res)
[Package boiwsa version 1.1.1 Index]