Debian Codegraph @

dwtools/Correlation.h

raw
1 #ifndef _Correlation_h_
2 #define _Correlation_h_
3 /* Correlation.h
4 *
5 * Copyright (C) 1993-2020 David Weenink
6 *
7 * This code is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 *
12 * This code is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this work. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include "SSCP.h"
22 #include "TableOfReal_extensions.h"
23
24 Thing_define (Correlation, SSCP) {
25 };
26
27 autoCorrelation TableOfReal_to_Correlation (TableOfReal me);
28
29 autoCorrelation TableOfReal_to_Correlation_rank (TableOfReal me);
30
31 autoCorrelation Correlation_create (integer dimension);
32
33 autoCorrelation Correlation_createSimple (constVECVU const& correlations, constVECVU const& centroid, integer numberOfObservations);
34
35 autoTableOfReal Correlation_confidenceIntervals (Correlation me, double confidenceLevel, integer numberOfTests, int method);
36 /*
37 if (method == 1)
38 Confidence intervals by Ruben's approximation
39 if (method == 2)
40 Obtain large-sample conservative multiple tests and intervals by the
41 Bonferroni inequality and the Fisher z transformation.
42
43 Put upper value of confidence intervals in upper matrix and lower
44 values of confidence intervals in lower part of resulting table.
45 Diagonal values are 1 (and represent both upper and lower c.i.).
46 */
47
48 void Correlation_testDiagonality_bartlett (Correlation me, integer numberOfContraints, double *out_chisq, double *out_prob, double *out_df);
49 /* Test if a Correlation matrix is diagonal, Morrison pp. 116-118 */
50
51 autoCorrelation SSCP_to_Correlation (SSCP me);
52
53 #endif /* _Correlation_h_ */