| find_opt | R Documentation |
Performs a grid search over combinations of yearly and monthly Fourier
(trigonometric) regressors and selects the number of terms that minimizes
AIC, AICc, or BIC. Candidate models are fitted by OLS to a detrended series,
where the trend is estimated using supsmu. Optional
holiday/trading-day regressors (H) and additive-outlier regressors
(AO) are included in every candidate specification if provided.
find_opt(
x,
dates,
H = NULL,
AO = NULL,
method = "additive",
l.max = 12,
k.max = 42,
by = 6
)
x |
Numeric vector containing the observed weekly time series. |
dates |
A vector of class |
H |
Optional matrix of holiday and trading-day regressors with
|
AO |
Optional matrix of additive-outlier regressors with
|
method |
Character string specifying the decomposition type. Either
|
l.max |
Integer. Maximum number of monthly-cycle Fourier harmonics to consider.
Defaults to |
k.max |
Integer. Maximum number of yearly-cycle Fourier harmonics to consider.
Defaults to |
by |
Integer. Step size for the grid search over |
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.