I have a simple Tx3 matrix of residuals. I want to apply to it the dwtest to test for autocorrellation (I also used autocorr but still I'd like to see a statistic).
However, when I try to implement it, I get:
dwtest(VAR1.res(:, 1), 'Exact')
Error using qr
Invalid data type. First argument must be double or single.
Error in pvaluedw (line 34)
[Q,~] = qr(X);
Error in dwtest (line 100)
pdw = pvaluedw(dw,X,option);
What am I doing wrong?