Site icon Amelt.net

VAR(Vector Autoregressions) select_order:”%d-th leading minor of the array is not positive not definite”

Amelt

Amelt

This post is also available in: 日本語 (Japanese)

This is a note about how to select optimal lag order by select_order() when you use VAR(Vector Autoregressions) model of statsmodels.

raise LinAlgError "%d-th leading minor of the array is not positive not definite"

In my case, explain it very simply, because the order of maxlags is large for the parameter, so it was solved by lowering the order of the maxlags of the select_order() (maxlags=1 ,etc...).

If the problem does not solved though "maxlags=1", I think there may be an error due to other causes.

model.select_order(maxlags=1)

references:
https://www.statsmodels.org/dev/vector_ar.html