1 function alpha=flag_implicit_significance(i)
2 % The use of FLAG_IMPLICIT_SIGNIFICANCE is in experimental state.
3 % flag_implicit_significance might even become obsolete.
5 % FLAG_IMPLICIT_SIGNIFICANCE sets and gets default alpha (level) of any significance test
6 % The default alpha-level is stored in the global variable FLAG_implicit_significance
7 % The idea is that the significance must not be assigned explicitely.
8 % This might yield more readable code.
10 % Choose alpha low enough, because in alpha*100% of the cases, you will
11 % reject the Null hypothesis just by change. For this reason, the default
14 % flag_implicit_significance(0.01)
15 % sets the alpha-level for the significance test
17 % alpha = flag_implicit_significance()
20 % flag_implicit_significance(alpha)
21 % sets default alpha-level
23 % alpha = flag_implicit_significance(alpha)
27 % - compatible to Matlab and Octave
29 % see also: CORRCOEF, PARTCORRCOEF
31 % $Id: flag_implicit_significance.m 8223 2011-04-20 09:16:06Z schloegl $
32 % Copyright (C) 2000-2002,2009,2010 by Alois Schloegl <alois.schloegl@gmail.com>
33 % This function is part of the NaN-toolbox
34 % http://pub.ist.ac.at/~schloegl/matlab/NaN/
36 % This program is free software; you can redistribute it and/or modify
37 % it under the terms of the GNU General Public License as published by
38 % the Free Software Foundation; either version 3 of the License, or
39 % (at your option) any later version.
41 % This program is distributed in the hope that it will be useful,
42 % but WITHOUT ANY WARRANTY; without even the implied warranty of
43 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 % GNU General Public License for more details.
46 % You should have received a copy of the GNU General Public License
47 % along with this program; If not, see <http://www.gnu.org/licenses/>.
50 persistent FLAG_implicit_significance;
53 %%% check whether FLAG was already defined
54 if ~exist('FLAG_implicit_significance','var'),
55 FLAG_implicit_significance = DEFAULT_ALPHA; % default value
57 if isempty(FLAG_implicit_significance),
58 FLAG_implicit_significance = DEFAULT_ALPHA; % default value
62 fprintf(2,'Warning: flag_implicit_significance is in an experimental state\n');
63 fprintf(2,'It might become obsolete.\n');
64 FLAG_implicit_significance = i;
67 alpha = FLAG_implicit_significance;