comparison scripts/statistics/tests/t_test_regression.m @ 5443:ec8c33dcd1bf

[project @ 2005-09-08 01:40:57 by jwe]
author jwe
date Thu, 08 Sep 2005 01:40:58 +0000
parents 2a16423e4aa0
children 34f96dd5441b
comparison
equal deleted inserted replaced
5442:636886245488 5443:ec8c33dcd1bf
46 46
47 if (nargin == 3) 47 if (nargin == 3)
48 r = 0; 48 r = 0;
49 alt = "!="; 49 alt = "!=";
50 elseif (nargin == 4) 50 elseif (nargin == 4)
51 if (isstr (r)) 51 if (ischar (r))
52 alt = r; 52 alt = r;
53 r = 0; 53 r = 0;
54 else 54 else
55 alt = "!="; 55 alt = "!=";
56 endif 56 endif
58 usage ("[pval, t, df] = t_test_regression (y, X, R, r, alt)"); 58 usage ("[pval, t, df] = t_test_regression (y, X, R, r, alt)");
59 endif 59 endif
60 60
61 if (! isscalar (r)) 61 if (! isscalar (r))
62 error ("t_test_regression: r must be a scalar"); 62 error ("t_test_regression: r must be a scalar");
63 elseif (! isstr (alt)) 63 elseif (! ischar (alt))
64 error ("t_test_regression: alt must be a string"); 64 error ("t_test_regression: alt must be a string");
65 endif 65 endif
66 66
67 [T, k] = size (X); 67 [T, k] = size (X);
68 if (! (isvector (y) && (length (y) == T))) 68 if (! (isvector (y) && (length (y) == T)))