|
1 | 1 | #Region "Microsoft.VisualBasic::f2b322d70e19e4fb221d5e612bdf3fb1, Library\Rlapack\stats.vb"
|
2 | 2 |
|
3 |
| - ' Author: |
4 |
| - ' |
5 |
| - |
6 |
| - |
7 |
| - |
8 |
| - ' |
9 |
| - ' Copyright (c) 2018 GPL3 Licensed |
10 |
| - ' |
11 |
| - ' |
12 |
| - ' GNU GENERAL PUBLIC LICENSE (GPL3) |
13 |
| - ' |
14 |
| - ' |
15 |
| - ' This program is free software: you can redistribute it and/or modify |
16 |
| - ' it under the terms of the GNU General Public License as published by |
17 |
| - ' the Free Software Foundation, either version 3 of the License, or |
18 |
| - ' (at your option) any later version. |
19 |
| - ' |
20 |
| - ' This program is distributed in the hope that it will be useful, |
21 |
| - ' but WITHOUT ANY WARRANTY; without even the implied warranty of |
22 |
| - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23 |
| - ' GNU General Public License for more details. |
24 |
| - ' |
25 |
| - ' You should have received a copy of the GNU General Public License |
26 |
| - ' along with this program. If not, see <http://www.gnu.org/licenses/>. |
27 |
| - |
28 |
| - |
29 |
| - |
30 |
| - ' /********************************************************************************/ |
31 |
| - |
32 |
| - ' Summaries: |
33 |
| - |
34 |
| - |
35 |
| - ' Code Statistics: |
36 |
| - |
37 |
| - ' Total Lines: 1917 |
38 |
| - ' Code Lines: 1071 (55.87%) |
39 |
| - ' Comment Lines: 634 (33.07%) |
40 |
| - ' - Xml Docs: 91.48% |
41 |
| - ' |
42 |
| - ' Blank Lines: 212 (11.06%) |
43 |
| - ' File Size: 81.81 KB |
44 |
| - |
45 |
| - |
46 |
| - ' Module stats |
47 |
| - ' |
48 |
| - ' Constructor: (+1 Overloads) Sub New |
49 |
| - ' Function: matrixDataFrame, matrixDataFrame2, printMatrix, printMvar, printTtest |
50 |
| - ' printTwoSampleTTest |
51 |
| - ' Enum p_adjust_methods |
52 |
| - ' |
53 |
| - ' BH, bonferroni, BY, fdr, hochberg |
54 |
| - ' holm, hommel, none |
55 |
| - ' |
56 |
| - ' |
57 |
| - ' |
58 |
| - ' |
59 |
| - ' |
60 |
| - ' Function: aov, asDist, beta, chisq_test, ChiSquare |
61 |
| - ' combin, corr, corr_sign, corrTest, dataframeRow |
62 |
| - ' dist, dnorm, ECDF, ecdf0, emd_dist |
63 |
| - ' filterMissing, fisher_test, gamma, gammaCDF, GetDataSetCommon |
64 |
| - ' getMatrix, getQuantileLevels, iqr_outliers, lbeta, lgamma |
65 |
| - ' Lowess, mantel_test, median, moran_test, mul |
66 |
| - ' oplsr, p_adjust, plsda, pnorm_func, PoissonDiskGenerator_func |
67 |
| - ' (+2 Overloads) pow, prcomp, pt, quantile, safeCheck |
68 |
| - ' spline, tabulateMode, ttest, ttestBatch, ttestImpl |
69 |
| - ' varTest, z_score, z_scoreByColumn, z_scoreByRow |
70 |
| - ' |
71 |
| - ' Enum SplineAlgorithms |
72 |
| - ' |
73 |
| - ' Bezier, BSpline, CatmullRom, CubiSpline |
74 |
| - ' |
75 |
| - ' |
76 |
| - ' |
77 |
| - ' |
78 |
| - ' |
79 |
| - ' /********************************************************************************/ |
| 3 | +' Author: |
| 4 | +' |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | +' |
| 9 | +' Copyright (c) 2018 GPL3 Licensed |
| 10 | +' |
| 11 | +' |
| 12 | +' GNU GENERAL PUBLIC LICENSE (GPL3) |
| 13 | +' |
| 14 | +' |
| 15 | +' This program is free software: you can redistribute it and/or modify |
| 16 | +' it under the terms of the GNU General Public License as published by |
| 17 | +' the Free Software Foundation, either version 3 of the License, or |
| 18 | +' (at your option) any later version. |
| 19 | +' |
| 20 | +' This program is distributed in the hope that it will be useful, |
| 21 | +' but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 | +' GNU General Public License for more details. |
| 24 | +' |
| 25 | +' You should have received a copy of the GNU General Public License |
| 26 | +' along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +' /********************************************************************************/ |
| 31 | + |
| 32 | +' Summaries: |
| 33 | + |
| 34 | + |
| 35 | +' Code Statistics: |
| 36 | + |
| 37 | +' Total Lines: 1917 |
| 38 | +' Code Lines: 1071 (55.87%) |
| 39 | +' Comment Lines: 634 (33.07%) |
| 40 | +' - Xml Docs: 91.48% |
| 41 | +' |
| 42 | +' Blank Lines: 212 (11.06%) |
| 43 | +' File Size: 81.81 KB |
| 44 | + |
| 45 | + |
| 46 | +' Module stats |
| 47 | +' |
| 48 | +' Constructor: (+1 Overloads) Sub New |
| 49 | +' Function: matrixDataFrame, matrixDataFrame2, printMatrix, printMvar, printTtest |
| 50 | +' printTwoSampleTTest |
| 51 | +' Enum p_adjust_methods |
| 52 | +' |
| 53 | +' BH, bonferroni, BY, fdr, hochberg |
| 54 | +' holm, hommel, none |
| 55 | +' |
| 56 | +' |
| 57 | +' |
| 58 | +' |
| 59 | +' |
| 60 | +' Function: aov, asDist, beta, chisq_test, ChiSquare |
| 61 | +' combin, corr, corr_sign, corrTest, dataframeRow |
| 62 | +' dist, dnorm, ECDF, ecdf0, emd_dist |
| 63 | +' filterMissing, fisher_test, gamma, gammaCDF, GetDataSetCommon |
| 64 | +' getMatrix, getQuantileLevels, iqr_outliers, lbeta, lgamma |
| 65 | +' Lowess, mantel_test, median, moran_test, mul |
| 66 | +' oplsr, p_adjust, plsda, pnorm_func, PoissonDiskGenerator_func |
| 67 | +' (+2 Overloads) pow, prcomp, pt, quantile, safeCheck |
| 68 | +' spline, tabulateMode, ttest, ttestBatch, ttestImpl |
| 69 | +' varTest, z_score, z_scoreByColumn, z_scoreByRow |
| 70 | +' |
| 71 | +' Enum SplineAlgorithms |
| 72 | +' |
| 73 | +' Bezier, BSpline, CatmullRom, CubiSpline |
| 74 | +' |
| 75 | +' |
| 76 | +' |
| 77 | +' |
| 78 | +' |
| 79 | +' /********************************************************************************/ |
80 | 80 |
|
81 | 81 | #End Region
|
82 | 82 |
|
@@ -2111,6 +2111,15 @@ Module stats
|
2111 | 2111 | ''' # Calculate kurtosis using e1071 package
|
2112 | 2112 | ''' kurtosis_value <- kurtosis(data);
|
2113 | 2113 | ''' print(kurtosis_value);
|
| 2114 | + ''' |
| 2115 | + ''' # in different algorithm type |
| 2116 | + ''' kurtosis(data,type =1); |
| 2117 | + ''' [1] -0.21875 |
| 2118 | + ''' kurtosis(data,type =2); |
| 2119 | + ''' [1] 0.940625 |
| 2120 | + ''' kurtosis(data,type =3); |
| 2121 | + ''' [1] -0.8706055 |
| 2122 | + ''' |
2114 | 2123 | ''' # Manual calculation of excess kurtosis
|
2115 | 2124 | ''' n <- length(data);
|
2116 | 2125 | ''' mean_data <- mean(data);
|
@@ -2187,6 +2196,14 @@ Module stats
|
2187 | 2196 | ''' # Calculate skewness using e1071 package
|
2188 | 2197 | ''' skewness_value <- skewness(data);
|
2189 | 2198 | ''' print(skewness_value);
|
| 2199 | + ''' |
| 2200 | + ''' skewness(data,type = 1); |
| 2201 | + ''' [1] 0.65625 |
| 2202 | + ''' skewness(data,type = 2); |
| 2203 | + ''' [1] 0.8184876 |
| 2204 | + ''' skewness(data,type = 3); |
| 2205 | + ''' [1] 0.5371325 |
| 2206 | + ''' |
2190 | 2207 | ''' # Manual calculation of skewness
|
2191 | 2208 | ''' n <- length(data);
|
2192 | 2209 | ''' mean_data <- mean(data);
|
|
0 commit comments