Skip to content
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

Added SVAR option to plot_cum_effects in irf #9107

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ikuzmin404
Copy link

plot_cum_effects function lacked SVAR check: when it was called for SVAR, it returned VAR cumulative IRFs despide them being calculated for SVAR internally. Thus one elif case has beed added to resolve this issue.

Example:

data_d_reer = pd.read_csv(r'data_
[Uploading data_reer.csv…]()
reer.csv', index_col=0)
svar_model = SVAR(data_d_reer, svar_type="A", A=amat, freq='Q').fit()
svar_model.irf().plot_cum_effects();

Current behavior: returns VAR cumulative IR's (self.cum_effects).
Expected behavior: returns SVAR cumulative IR's (self.svar_cum_effects)

plot_cum_effects function lacked SVAR check: when it was called for SVAR, it returned VAR cumulative IRFs despide them being calculated for SVAR internally. Thus one elif case has beed added to resolve this issue.
@ikuzmin404
Copy link
Author

Sorry, for some reason data failed to attach:

data_reer.csv

Moved svar=True argument into function itself as svar = self.svar
@pep8speaks
Copy link

Hello @ikuzmin404! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 211:1: W293 blank line contains whitespace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants