Time Series - Automatic inclusion of dummy according to residuals analysis
Posted: Fri Mar 09, 2018 2:37 pm
Hi,
I am trying to write a program that after estimating an equation (or rather a batch of equations), looks at the residuals and if the last data point is outside the bands of the residuals graph, put a dummy in the equation with the date associated with that observation. For example, since I have monthly data, a dummy of the type: @event("2018.02") for the last month of data.
Perhaps accessing the residuals table: eqname.resids(t)?
I just don't know how to access the elements of that table in order to write a IF statement or something similar.
Thank you in advance for any help that you can provide.
I am trying to write a program that after estimating an equation (or rather a batch of equations), looks at the residuals and if the last data point is outside the bands of the residuals graph, put a dummy in the equation with the date associated with that observation. For example, since I have monthly data, a dummy of the type: @event("2018.02") for the last month of data.
Perhaps accessing the residuals table: eqname.resids(t)?
I just don't know how to access the elements of that table in order to write a IF statement or something similar.
Thank you in advance for any help that you can provide.