Skip to content

FIX: Check for trend type in VAR models - #2329

Merged
josef-pkt merged 1 commit into
statsmodels:masterfrom
saketkc:fix_var-2271
Mar 19, 2015
Merged

josef-pkt merged 1 commit into
statsmodels:masterfrom
saketkc:fix_var-2271

Conversation

@saketkc

@saketkc saketkc commented Mar 19, 2015

Copy link
Copy Markdown
Contributor

Fixes #2271
Also, see #2327

@josef-pkt

Copy link
Copy Markdown
Member

Thanks, looks good for 2271

One extra check that I just remembered, it has been several years since I worked on this. I remember for some functions trend order could be given as a string or as an integer.

Is trend allowed to be an integer? Just try an example with the master version trend=1.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.0%) to 83.91% when pulling ea87486 on saketkc:fix_var-2271 into 5dd2502 on statsmodels:master.

@saketkc

saketkc commented Mar 19, 2015

Copy link
Copy Markdown
Contributor Author

I don't think so. But it is not difficult to do so:
https://github.com/statsmodels/statsmodels/blob/master/statsmodels/tsa/vector_ar/util.py#L37
This should be called only if trend is not an integer. Though, I am not convinced it is a good idea to do so, since it leads to incoherency.

@josef-pkt

Copy link
Copy Markdown
Member

Yes, I think trend as integer is a similar problem that it is supported in some pieces but not in others.
It's better to raise the ValueError.

@josef-pkt josef-pkt added this to the 0.7 milestone Mar 19, 2015
josef-pkt added a commit that referenced this pull request Mar 19, 2015
BUG: Check trend type in VAR models
@josef-pkt
josef-pkt merged commit 93238a7 into statsmodels:master Mar 19, 2015
@josef-pkt

Copy link
Copy Markdown
Member

merged, thanks @saketkc

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.

BUG VAR fit with trend='t' raises exception

3 participants