Skip to content

BUG: Ensure coint_johansen runs with 0 lags - #5783

Merged
bashtage merged 1 commit into
statsmodels:masterfrom
bashtage:var-0-lag
May 24, 2019
Merged

bashtage merged 1 commit into
statsmodels:masterfrom
bashtage:var-0-lag

Conversation

@bashtage

Copy link
Copy Markdown
Member

Fix bug created using [:-0]

closes #5731

Comment thread statsmodels/tsa/vector_ar/vecm.py Outdated
r0t = resid(dx, z)
lx = endog[:-k_ar_diff]
# GH 5731, [:-0] does not work, need [:t-0]
lx = np.asarray(endog)[:endog.shape[0]-k_ar_diff]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

there should be an endog = np.asarray(endog) at the beginning of the function
It's missing and pandas Series might not work correctly

@coveralls

coveralls commented May 24, 2019 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 84.989% when pulling 1e3b9e1 on bashtage:var-0-lag into 809efa1 on statsmodels:master.

@codecov

codecov Bot commented May 24, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #5783 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5783      +/-   ##
==========================================
+ Coverage   82.44%   82.45%   +<.01%     
==========================================
  Files         594      594              
  Lines       93678    93689      +11     
  Branches    10357    10357              
==========================================
+ Hits        77236    77249      +13     
+ Misses      14044    14042       -2     
  Partials     2398     2398
Impacted Files Coverage Δ
statsmodels/tsa/vector_ar/tests/test_coint.py 100% <100%> (ø) ⬆️
statsmodels/tsa/vector_ar/vecm.py 93.26% <100%> (+0.25%) ⬆️
statsmodels/stats/descriptivestats.py 24.34% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 809efa1...1e3b9e1. Read the comment docs.

@codecov

codecov Bot commented May 24, 2019

Copy link
Copy Markdown

Codecov Report

Merging #5783 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5783      +/-   ##
==========================================
+ Coverage   82.44%   82.45%   +<.01%     
==========================================
  Files         594      594              
  Lines       93678    93688      +10     
  Branches    10357    10357              
==========================================
+ Hits        77236    77248      +12     
+ Misses      14044    14042       -2     
  Partials     2398     2398
Impacted Files Coverage Δ
statsmodels/tsa/vector_ar/tests/test_coint.py 100% <100%> (ø) ⬆️
statsmodels/tsa/vector_ar/vecm.py 93.25% <100%> (+0.24%) ⬆️
statsmodels/stats/descriptivestats.py 24.34% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 809efa1...34f531e. Read the comment docs.

@bashtage
bashtage merged commit 22aaef4 into statsmodels:master May 24, 2019
@bashtage
bashtage deleted the var-0-lag branch May 24, 2019 16:37
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 coint_johansen with k_ar_diff = 0

3 participants