VARMAX model, vgxvarx, Covariance is not positive-definite.

3 views (last 30 days)
Hi all
When trying to estimate a VAR(1) model with MATLAB I always get the following error message:
Error using mvregress (line 421)
Covariance is not positive-definite.
Error in vgxvarx (line 521)
[x,Q,~,xvar] = mvregress(D,R, 'covtype',covartype, 'varformat',varformat, ...
I am having 10 time series processes with 11 observations each which is stored in a 11x10 vector called "mydata". The series are stationary. I use the following code:
Spec = vgxset('nAR',1,'Constant',true, 'n',10)
[EstSpec,EstStdErrors,LLF,W] = vgxvarx(Spec, mydata(:,[1:10]))
The problem is that I cannot estimate more than 5 series together. I can , for example, specify:
Spec = vgxset('nAR',1,'Constant',true, 'n',7)
[EstSpec,EstStdErrors,LLF,W] = vgxvarx(Spec,mydata(:,[4:10]))
which leads to the named error message.
Whereas...
Spec = vgxset('nAR',1,'Constant',true, 'n',5)
[EstSpec,EstStdErrors,LLF,W] = vgxvarx(Spec,mydata(:,[6:10]))
works just fine and provides a reliable result.
What can I do or how do I have to modify the code to include more than 5 processes in order to make the model work?
Does someone have any ideas?
In advance many thanks for your help!
Best Regards Lukas

Answers (0)

Categories

Find more on Conditional Mean Models in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!