Skip to content

Commit 427d859

Browse files
committed
add examples
1 parent 67c4317 commit 427d859

File tree

1 file changed

+94
-77
lines changed

1 file changed

+94
-77
lines changed

Library/Rlapack/stats.vb

+94-77
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,82 @@
11
#Region "Microsoft.VisualBasic::f2b322d70e19e4fb221d5e612bdf3fb1, Library\Rlapack\stats.vb"
22

3-
' Author:
4-
'
5-
6-
7-
' xieguigang ([email protected])
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+
' xieguigang ([email protected])
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+
' /********************************************************************************/
8080

8181
#End Region
8282

@@ -2111,6 +2111,15 @@ Module stats
21112111
''' # Calculate kurtosis using e1071 package
21122112
''' kurtosis_value &lt;- kurtosis(data);
21132113
''' 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+
'''
21142123
''' # Manual calculation of excess kurtosis
21152124
''' n &lt;- length(data);
21162125
''' mean_data &lt;- mean(data);
@@ -2187,6 +2196,14 @@ Module stats
21872196
''' # Calculate skewness using e1071 package
21882197
''' skewness_value &lt;- skewness(data);
21892198
''' 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+
'''
21902207
''' # Manual calculation of skewness
21912208
''' n &lt;- length(data);
21922209
''' mean_data &lt;- mean(data);

0 commit comments

Comments
 (0)