EGCITEST: Error using lagmatrix (line 25) lagmatrix: wrong # of input arguments. Please, can someone help? thx
조회 수: 8 (최근 30일)
이전 댓글 표시
Hello,
I am trying to use built-in fx to check cointegration but when I use adftest and egcitest (I have the econometric package installed) I get the following msg:
EDU>> doc egictest
EDU>> load Data_Canada
Y = Data(:,3:end);
names = series(3:end);
plot(dates,Y)
legend(names,'location','NW')
grid on
EDU>> [h,pValue,stat,cValue,reg] = egcitest(Y,'test',...
{'t1','t2'});
Error using lagmatrix (line 25)
lagmatrix: wrong # of input arguments
Error in adftest>runReg (line 686)
yLags = lagmatrix(y,0:(testLags+1));
Error in adftest (line 414)
testReg = runReg(i,y,testT,testLags,testModel,needRegOut);
Error in egcitest/runRReg (line 1043)
[~,~,testStat] = adftest(res,'lags',testLags,'test',testType);
Error in egcitest (line 397)
testStat = runRReg;
Please, anyone can help?
thx a lot
댓글 수: 0
답변 (2개)
steve
2014년 1월 22일
I believe there is a conflict between the matlab standard function "lagmatrix" and the "lagmatrix that comes with the spatial econometrics package. I had the same problem - it does away if you delete the spatial econometrics package from the path file. Although this is not an ideal solution...
댓글 수: 0
Ali Komai
2019년 4월 2일
I had a strange variation of this error and thought I post it. Steve is correct that the error is caused by a conflicting file of the spatial econometrics toolbox and taking the later from the matlab-path solves the problem but (here comes the funny part) the error reoccurs when egcitest is used in a parfor-loop!
Although I do not understand how this is possible. Even if the file of the spatial econometrics toolbox is NOT on the matlab path, it will be chosen in a parfor-loop over the file with the same name in the econometrics toolbox. I solved the issue now by renaming the file from the spatial econometrics toolbox.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Stochastic Differential Equation (SDE) Models에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!