Skip to content

Var cleanup rebased - #3028

Open
josef-pkt wants to merge 30 commits into
statsmodels:mainfrom
josef-pkt:var_cleanup_rebased
Open

josef-pkt wants to merge 30 commits into
statsmodels:mainfrom
josef-pkt:var_cleanup_rebased

Conversation

@josef-pkt

@josef-pkt josef-pkt commented Jun 17, 2016 •

Copy link
Copy Markdown
Member

rebased version of #815 Skipper's VAR cleanup

see original PR for TODO and DONE list for this PR
see #2274 for a SUMM issue for VAR cleanup

many manually edited merge conflicts (many of the merge conflicts were in view numpy compatibility, adding type keyword, compatibility fixes by Pierre)

I cannot run the entire tests right now because matplotlib segfaults on my computer, in this case in statsmodels.tsa.vector_ar.tests.test_var.TestVARResults.test_plot_cum_effects

code analysis in Eclipse/PyDev still shows several red lines, i.e. bugs.

This should be compared to statespace VARMAX for consistency, especially names and shapes.

Do we have a glossary for names used in VAR? e.g. attributes for AR part and for deterministic/trend/exog and for combined/all regressors.

extras

wald_test_terms would be useful to test for lags or for variables (like granger causality)
t_test is still NotImplementedError: possible solution: reshape params, call super, reshape back (reshape needs to match cov_params)

jseabold added 29 commits June 16, 2016 21:24
# df_resid right now is T - Kp - 1, which is a suggested correction

avobs = len(y_sample)
available_obs = len(Y_sample)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the same as nobs in __init__. based on code comment there

yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Jul 30, 2016
Point forecasts now also work with deterministic terms.
Some VAR code has been reused and rewritten. The main idea for rewriting the forecast function were taken from statsmodels#3028.
Tests:
Before implementing forecasts: 224/226 passing
After:                         234/236 passing
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Jul 30, 2016
In contrast to point forecasts, there was no global function in var_model.py that handles confidence intervals. So I copied the necessary lines from the VARProcess/VARResults classes such that they are outside the classes. After the VAR-related code has been cleaned up (statsmodels#3028) and the VAR framework can handle arbitrary deterministic terms, VECMResults' var_repr method can be rewritten such that it returns a VARResults object. Then the class internal code can be used and the newly copied lines in var_model.py can be deleted again. (In this case please note that then the forecast_cov method of the superclass will have to be used!)
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Sep 16, 2016
Point forecasts now also work with deterministic terms.
Some VAR code has been reused and rewritten. The main idea for rewriting the forecast function were taken from statsmodels#3028.
Tests:
Before implementing forecasts: 224/226 passing
After:                         234/236 passing
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Sep 16, 2016
In contrast to point forecasts, there was no global function in var_model.py that handles confidence intervals. So I copied the necessary lines from the VARProcess/VARResults classes such that they are outside the classes. After the VAR-related code has been cleaned up (statsmodels#3028) and the VAR framework can handle arbitrary deterministic terms, VECMResults' var_repr method can be rewritten such that it returns a VARResults object. Then the class internal code can be used and the newly copied lines in var_model.py can be deleted again. (In this case please note that then the forecast_cov method of the superclass will have to be used!)
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Sep 16, 2016
Point forecasts now also work with deterministic terms.
Some VAR code has been reused and rewritten. The main idea for rewriting the forecast function were taken from statsmodels#3028.
Tests:
Before implementing forecasts: 224/226 passing
After:                         234/236 passing
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Sep 16, 2016
In contrast to point forecasts, there was no global function in var_model.py that handles confidence intervals. So I copied the necessary lines from the VARProcess/VARResults classes such that they are outside the classes. After the VAR-related code has been cleaned up (statsmodels#3028) and the VAR framework can handle arbitrary deterministic terms, VECMResults' var_repr method can be rewritten such that it returns a VARResults object. Then the class internal code can be used and the newly copied lines in var_model.py can be deleted again. (In this case please note that then the forecast_cov method of the superclass will have to be used!)
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Sep 26, 2016
Point forecasts now also work with deterministic terms.
Some VAR code has been reused and rewritten. The main idea for rewriting the forecast function were taken from statsmodels#3028.
Tests:
Before implementing forecasts: 224/226 passing
After:                         234/236 passing
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Sep 26, 2016
In contrast to point forecasts, there was no global function in var_model.py that handles confidence intervals. So I copied the necessary lines from the VARProcess/VARResults classes such that they are outside the classes. After the VAR-related code has been cleaned up (statsmodels#3028) and the VAR framework can handle arbitrary deterministic terms, VECMResults' var_repr method can be rewritten such that it returns a VARResults object. Then the class internal code can be used and the newly copied lines in var_model.py can be deleted again. (In this case please note that then the forecast_cov method of the superclass will have to be used!)
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Mar 23, 2017
Point forecasts now also work with deterministic terms.
Some VAR code has been reused and rewritten. The main idea for rewriting the forecast function were taken from statsmodels#3028.
Tests:
Before implementing forecasts: 224/226 passing
After:                         234/236 passing
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Mar 23, 2017
In contrast to point forecasts, there was no global function in var_model.py that handles confidence intervals. So I copied the necessary lines from the VARProcess/VARResults classes such that they are outside the classes. After the VAR-related code has been cleaned up (statsmodels#3028) and the VAR framework can handle arbitrary deterministic terms, VECMResults' var_repr method can be rewritten such that it returns a VARResults object. Then the class internal code can be used and the newly copied lines in var_model.py can be deleted again. (In this case please note that then the forecast_cov method of the superclass will have to be used!)
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Jun 22, 2017
Point forecasts now also work with deterministic terms.
Some VAR code has been reused and rewritten. The main idea for rewriting the forecast function were taken from statsmodels#3028.
Tests:
Before implementing forecasts: 224/226 passing
After:                         234/236 passing
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Jun 22, 2017
In contrast to point forecasts, there was no global function in var_model.py that handles confidence intervals. So I copied the necessary lines from the VARProcess/VARResults classes such that they are outside the classes. After the VAR-related code has been cleaned up (statsmodels#3028) and the VAR framework can handle arbitrary deterministic terms, VECMResults' var_repr method can be rewritten such that it returns a VARResults object. Then the class internal code can be used and the newly copied lines in var_model.py can be deleted again. (In this case please note that then the forecast_cov method of the superclass will have to be used!)
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Jun 27, 2017
Point forecasts now also work with deterministic terms.
Some VAR code has been reused and rewritten. The main idea for rewriting the forecast function were taken from statsmodels#3028.
Tests:
Before implementing forecasts: 224/226 passing
After:                         234/236 passing
yogabonito added a commit to yogabonito/statsmodels that referenced this pull request Jun 27, 2017
In contrast to point forecasts, there was no global function in var_model.py that handles confidence intervals. So I copied the necessary lines from the VARProcess/VARResults classes such that they are outside the classes. After the VAR-related code has been cleaned up (statsmodels#3028) and the VAR framework can handle arbitrary deterministic terms, VECMResults' var_repr method can be rewritten such that it returns a VARResults object. Then the class internal code can be used and the newly copied lines in var_model.py can be deleted again. (In this case please note that then the forecast_cov method of the superclass will have to be used!)
@josef-pkt josef-pkt mentioned this pull request Oct 1, 2017
1 of 6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants