-
Notifications
You must be signed in to change notification settings - Fork 71
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
Introduce ArmaModel to Pastas #198
Conversation
Don't run on travis because the Notebook depends on statsmodels.
What do you think of the name of the second parameter, theta? I am not sure about this, as we also used theta for the impulse response function.. It could be Phi, although that is typically used for the AR part of an ARMA model. Thoughts? |
Couple comments:
Nice job! |
Good idea. I changed theta to beta.
I added the irregular example at the end of the Notebook. However, it does not work for this as I did not apply weights yet (we should work on that for the future). This can be done in a future PR.
EDIT: just changed the method to generate ARMA(1,1) noise to a formula and commented out Statsmodels.
I think you refer to the autocorrelation plot in step 6. There is only a significant autocorrelation (ACF > 95% conf. interval) at two time lags, which is not a problem. I will add a test showing this in the future when we implemented such tests in Pastas.
This is the result of an overestimation of the AR(1) parameter, trying to correct for the MA(1) part. This results in negative autocorrelation over the first few time lags. I added this explanation to the notebook.
I expect this is the case as long as it is an MA(1) process, but in real data it may be a MA(14) of course, so an ARMA(1,1) model may still help when using biweekly observations. |
I'll leave the branch open so we can work on developing a new version of the ArmaModel that applies weights and works with irregular time steps. |
Short Description
This PR introduces an ARMA(1,1) noise model to Pastas. For now, it is only tested on regular time steps. The use of Numba is recommended to maintain speed, but without it it still works fine. The accompanying Notebook tests the new model and shows how to use it. The formulation is applicable for irregular time steps, but more research (outside this PR) is necessary to confirm its applicability for this type of data.
Checklist before PR can be merged: