-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Automatic K optimization for Fourier Terms #207
Comments
Automating the choice of K could be a feature we look at in a future release. It is very unlikely to affect the order of differencing, so I think using AICc for selection is safe enough. |
This is something which will need to be added on a model by model basis, as each model will have different methods of model selection. |
Could we iteratively select the best K based on the whatever criteria is used in the base model? My idea is to fit fourier series of different K linearly to the response and select the one with the best criteria measure as passed by the base model. Is there a case where we wouldn't want to fit it linearly? I'll admit that re-estimation after fitting the rest of the model would be good, but that this might provided directionality for the user that doesn't know which K to select. |
As in interim solution, I am trying to fit multiple moders in a loop manner so that I do not have to repeat the formula so many times. Yet I am struggling (I do not have that much of a background in tidy R). Could you help? |
If I wish to fit a regression with Fourier terms then to find the optimal K I need to do something like this:
It would be more convenient for K to be automatically determined through something like this:
model(arima = ARIMA(Passengers ~ Fourier(K = 1:3) + PDQ(0,0,0)
On that note, when I look at the source code for ARIMA it appears that when fitting a regression + ARIMA the number of differences is determined after the regression. Because of this, it seems entirely possible that the arima1, arima2 and arima3 models I fit could potentially have a different number of differencing. If this is indeed the case perhaps determining K through cross validation is better?
Thanks!
The text was updated successfully, but these errors were encountered: