Cases prefixed with W are classified as warnings and do not generate an error of type NAG:error_n. See nag_issue_warnings.
On entry, | , |
or | , |
or | , |
or | , |
or | , |
or | lwork is too small. |
Open in the MATLAB editor: g13dp_example
function g13dp_example fprintf('g13dp example results\n\n'); z = [-1.49, -1.62, 5.20, 6.23, 6.21, 5.86, 4.09, 3.18, 2.62, 1.49, 1.17, ... 0.85, -0.35, 0.24, 2.44, 2.58, 2.04, 0.40, 2.26, 3.34, 5.09, 5.00, ... 4.78, 4.11, 3.45, 1.65, 1.29, 4.09, 6.32, 7.50, 3.89, 1.58, 5.21, ... 5.25, 4.93, 7.38, 5.87, 5.81, 9.68, 9.07, 7.29, 7.84, 7.55, 7.32, ... 7.97, 7.76, 7.00, 8.35; 7.34, 6.35, 6.96, 8.54, 6.62, 4.97, 4.55, 4.81, 4.75, 4.76,10.88, ... 10.01, 11.62,10.36, 6.40, 6.24, 7.93, 4.04, 3.73, 5.60, 5.35, 6.81, ... 8.27, 7.68, 6.65, 6.08,10.25, 9.14,17.75,13.30, 9.63, 6.80, 4.08, ... 5.06, 4.94, 6.65, 7.94,10.76,11.89, 5.85, 9.01, 7.50,10.02,10.38, ... 8.15, 8.37, 10.73, 12.14]; [k,n] = size(z); k = int64(k); m = int64(10); [maxlag, parlag, se, qq, x, pvalue, loglhd, ifail] = ... g13dp(k, z, m); fprintf('%31s%13s%10s%13s%8s\n','Partial Autoregression Matrices', ... 'Indicator', 'Residual', 'Chi-Square', 'Pvalue'); fprintf('%43s%12s%12s\n', 'Symbols', 'Variances', 'Statistic'); fprintf('%31s%13s%10s%13s%8s\n','-------------------------------', ... '---------', '--------', '----------', '------') for l = 1:maxlag for j = 1:k sum = parlag(1,j,l); st(j) = '.'; if sum>1.96*se(1,j,l) st(j) = '+'; end if sum<-1.96*se(1,j,l) st(j) = '-'; end end fprintf('\n Lag %2d :%8.3f%8.3f%15s%13.3f%13.3f%9.3f\n', ... l, parlag(1,1:k,l), st(1:k), qq(1,1,l), x(l), pvalue(l)); fprintf(' (%6.3f)(%6.3f)\n', se(1,1:k,l)); for i = 2:k for j = 1:k sum = parlag(i,j,l); st(j) = '.'; if sum>1.96*se(i,j,l) st(j) = '+'; end if sum<-1.96*se(i,j,l) st(j) = '-'; end end fprintf('%17.3f%8.3f%15s%13.3f\n', parlag(i,1:k,l), st(1:k), qq(i,i,l)); fprintf(' (%6.3f)(%6.3f)\n', se(i,1:k,l)); end end
g13dp example results Partial Autoregression Matrices Indicator Residual Chi-Square Pvalue Symbols Variances Statistic ------------------------------- --------- -------- ---------- ------ Lag 1 : 0.757 0.062 +. 2.731 49.884 0.000 ( 0.092)( 0.092) 0.061 0.570 .+ 5.440 ( 0.129)( 0.130) Lag 2 : -0.161 -0.135 .. 2.530 3.347 0.502 ( 0.145)( 0.109) -0.093 -0.065 .. 5.486 ( 0.213)( 0.160) Lag 3 : 0.237 0.044 .. 1.755 13.962 0.007 ( 0.128)( 0.095) 0.047 -0.248 .. 5.291 ( 0.222)( 0.165) Lag 4 : -0.098 0.152 .. 1.661 7.071 0.132 ( 0.134)( 0.099) 0.402 -0.194 .. 4.786 ( 0.228)( 0.168) Lag 5 : 0.257 -0.026 .. 1.504 5.184 0.269 ( 0.141)( 0.106) 0.400 -0.021 .. 4.447 ( 0.242)( 0.183) Lag 6 : -0.075 0.112 .. 1.480 2.083 0.721 ( 0.156)( 0.111) 0.196 -0.106 .. 4.425 ( 0.269)( 0.192) Lag 7 : -0.054 0.097 .. 1.478 5.074 0.280 ( 0.166)( 0.121) 0.574 -0.080 +. 3.838 ( 0.267)( 0.195) Lag 8 : 0.147 0.041 .. 1.415 10.991 0.027 ( 0.188)( 0.128) 0.916 -0.242 +. 2.415 ( 0.246)( 0.167) Lag 9 : -0.039 0.099 .. 1.322 3.936 0.415 ( 0.251)( 0.140) -0.500 0.173 .. 2.196 ( 0.324)( 0.181) Lag 10 : 0.189 0.131 .. 1.206 3.175 0.529 ( 0.275)( 0.157) -0.183 -0.040 .. 2.201 ( 0.371)( 0.212)