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 | , |
or | . |
Open in the MATLAB editor: g13dm_example
function g13dm_example fprintf('g13dm example results\n\n'); w = [-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(w); k = int64(k); matrix = 'R'; m = int64(10); [wmean, r0, r, ifail] = g13dm( ... matrix, k, m, w); disp('The means'); disp(wmean'); disp('Cross-Correlation Matrices'); disp('Lag = 0'); disp(r0); for l = 1:m fprintf('Lag = %d\n',l); disp(r(:,:,l)); end sn1 = 1/sqrt(n); fprintf('Standard error = 1/sqrt(n) = %7.4f\n\n',sn1); disp('Tables Of Indicator Symbols'); fprintf('\nFor Lags 1 to %d\n',m); lhs = {' 0.005 :'; ' + 0.01 :'; ' 0.05 :'; ' Sig. Level :- - - - - - - - - - Lags'; ' 0.05 :'; ' - 0.01 :'; ' 0.005 :'}; c = sn1*[3.29, 2.58, 1.96, 0, -1.96, -2.58, -3.29]; for i = 1:k for j=1:k if i==j fprintf('\nAuto-correlation function for series %d\n', i); else fprintf('\nCross-correlation function for series %d and series %d\n', ... i, j); end rhs = lhs; for t = 1:m for u = 1:3 if r(i,j,t)>c(u) rhs{u} = strcat(rhs{u},'*'); end end for u = 5:7 if r(i,j,t)<c(u) rhs{u} = strcat(rhs{u},'*'); end end end fprintf('\n'); fprintf('%s\n',rhs{1:end}); end end
g13dm example results The means 4.3702 7.8675 Cross-Correlation Matrices Lag = 0 2.8176 0.2493 0.2493 2.8149 Lag = 1 0.7359 0.1743 0.2114 0.5546 Lag = 2 0.4557 0.0764 0.0693 0.2605 Lag = 3 0.3792 0.0138 0.0260 -0.0381 Lag = 4 0.3224 0.1100 0.0933 -0.2359 Lag = 5 0.3411 0.2694 0.0872 -0.2501 Lag = 6 0.3631 0.3436 0.1323 -0.2265 Lag = 7 0.2800 0.4254 0.2069 -0.1285 Lag = 8 0.2480 0.5217 0.1970 -0.0846 Lag = 9 0.2398 0.2664 0.2537 0.0745 Lag = 10 0.1619 -0.0197 0.2667 0.0047 Standard error = 1/sqrt(n) = 0.1443 Tables Of Indicator Symbols For Lags 1 to 10 Auto-correlation function for series 1 0.005 :* + 0.01 :*** 0.05 :****** Sig. Level :- - - - - - - - - - Lags 0.05 : - 0.01 : 0.005 : Cross-correlation function for series 1 and series 2 0.005 :* + 0.01 :** 0.05 :*** Sig. Level :- - - - - - - - - - Lags 0.05 : - 0.01 : 0.005 : Cross-correlation function for series 2 and series 1 0.005 : + 0.01 : 0.05 : Sig. Level :- - - - - - - - - - Lags 0.05 : - 0.01 : 0.005 : Auto-correlation function for series 2 0.005 :* + 0.01 :* 0.05 :* Sig. Level :- - - - - - - - - - Lags 0.05 : - 0.01 : 0.005 :