Editing Statistics package
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
<code>pkg install -forge statistics</code> | <code>pkg install -forge statistics</code> | ||
The following sections provide an overview of the functions available in the statistics package sorted alphabetically and arranged in groups similarly to the package's INDEX file | The following sections provide an overview of the functions available in the statistics package sorted alphabetically and arranged in groups similarly to the package's INDEX file. | ||
== Clustering == | == Clustering == | ||
Line 9: | Line 9: | ||
=== Available functions === | === Available functions === | ||
The following table lists the available | The following table lists the functions available for clustering. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 15: | Line 15: | ||
! Description | ! Description | ||
|- | |- | ||
| | | cluster | ||
| Define clusters from an agglomerative hierarchical cluster tree. | | Define clusters from an agglomerative hierarchical cluster tree. | ||
|- | |- | ||
| | | cmdscale | ||
| Classical multidimensional scaling of a matrix. | | Classical multidimensional scaling of a matrix. | ||
|- | |- | ||
| | | confusionmat | ||
| Compute a confusion matrix for classification problems. | | Compute a confusion matrix for classification problems. | ||
|- | |- | ||
| | | cophenet | ||
| Compute the cophenetic correlation coefficient. | | Compute the cophenetic correlation coefficient. | ||
|- | |- | ||
| | | evalclusters | ||
| Create a clustering evaluation object to find the optimal number of clusters. | | Create a clustering evaluation object to find the optimal number of clusters. | ||
|- | |- | ||
| | | inconsistent | ||
| Compute the inconsistency coefficient for each link of a hierarchical cluster tree. | | Compute the inconsistency coefficient for each link of a hierarchical cluster tree. | ||
|- | |- | ||
| | | kmeans | ||
| Perform a K-means clustering of an NxD matrix. | | Perform a K-means clustering of an NxD matrix. | ||
|- | |- | ||
| | | linkage | ||
| Produce a hierarchical clustering dendrogram. | | Produce a hierarchical clustering dendrogram. | ||
|- | |- | ||
| | | mahal | ||
| Mahalanobis' D-square distance. | | Mahalanobis' D-square distance. | ||
|- | |- | ||
| | | optimalleaforder | ||
| Compute the optimal leaf ordering of a hierarchical binary cluster tree. | | Compute the optimal leaf ordering of a hierarchical binary cluster tree. | ||
|- | |- | ||
| | | pdist | ||
| Return the distance between any two rows in X. | | Return the distance between any two rows in X. | ||
|- | |- | ||
| | | pdist2 | ||
| Compute pairwise distance between two sets of vectors. | | Compute pairwise distance between two sets of vectors. | ||
|- | |- | ||
| | | squareform | ||
| Interchange between distance matrix and distance vector formats. | | Interchange between distance matrix and distance vector formats. | ||
|} | |} | ||
Line 72: | Line 57: | ||
=== TODO list === | === TODO list === | ||
Missing functions | Missing functions that are intended to be included in the forthcoming release | ||
<div style="column-count:1;-moz-column-count:1;-webkit-column-count:1"> | <div style="column-count:1;-moz-column-count:1;-webkit-column-count:1"> | ||
* | * procrustes | ||
</div> | </div> | ||
Line 82: | Line 67: | ||
=== Available functions === | === Available functions === | ||
The following table lists the available | The following table lists the functions available for data manipulation. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 88: | Line 73: | ||
! Description | ! Description | ||
|- | |- | ||
| | | combnk | ||
| Return all combinations of K elements in DATA. | | Return all combinations of K elements in DATA. | ||
|- | |- | ||
| | | crosstab | ||
| Create a cross-tabulation (contingency table) T from data vectors. | | Create a cross-tabulation (contingency table) T from data vectors. | ||
|- | |- | ||
| | | datasample | ||
| Randomly sample data. | | Randomly sample data. | ||
|- | |- | ||
| | | grp2idx | ||
| Get index for group variables. | | Get index for group variables. | ||
|- | |- | ||
| | | tabulate | ||
| Compute a frequency table. | | Compute a frequency table. | ||
|} | |} | ||
Line 123: | Line 93: | ||
=== Available functions === | === Available functions === | ||
The following table lists the available | The following table lists the functions available for descriptive statistics. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 129: | Line 99: | ||
! Description | ! Description | ||
|- | |- | ||
| | | geomean | ||
| Compute the geometric mean. | | Compute the geometric mean. | ||
|- | |- | ||
| | | grpstats | ||
| Compute summary statistics by group. Fully MATLAB compatible. | | Compute summary statistics by group. Fully MATLAB compatible. | ||
|- | |- | ||
| | | harmmean | ||
| Compute the harmonic mean. | | Compute the harmonic mean. | ||
|- | |- | ||
| | | jackknife | ||
| Compute jackknife estimates of a parameter taking one or more given samples as parameters. | | Compute jackknife estimates of a parameter taking one or more given samples as parameters. | ||
|- | |- | ||
| | | mean | ||
| Compute the mean. Fully MATLAB compatible. | | Compute the mean. Fully MATLAB compatible. | ||
|- | |- | ||
| | | median | ||
| Compute the median. Fully MATLAB compatible. | | Compute the median. Fully MATLAB compatible. | ||
|- | |- | ||
| | | nanmax | ||
| Find the maximal element while ignoring NaN values. | | Find the maximal element while ignoring NaN values. | ||
|- | |- | ||
| | | nanmin | ||
| Find the minimal element while ignoring NaN values. | | Find the minimal element while ignoring NaN values. | ||
|- | |- | ||
| | | nansum | ||
| Compute the sum while ignoring NaN values. | | Compute the sum while ignoring NaN values. | ||
|- | |- | ||
| | | std | ||
| Compute the standard deviation. Fully MATLAB compatible. | | Compute the standard deviation. Fully MATLAB compatible. | ||
|- | |- | ||
| | | trimmean | ||
| Compute the trimmed mean. | | Compute the trimmed mean. | ||
|- | |- | ||
| | | std | ||
| Compute the variance. Fully MATLAB compatible. | | Compute the variance. Fully MATLAB compatible. | ||
|} | |} | ||
Line 171: | Line 138: | ||
=== In external packages === | === In external packages === | ||
bootci, bootstrp are implemented in the [https://gnu-octave.github.io/packages/statistics-bootstrap statistics-bootstrap] package. | |||
=== Shadowing Octave core functions === | === Shadowing Octave core functions === | ||
Line 178: | Line 145: | ||
<div style="column-count:1;-moz-column-count:1;-webkit-column-count:1"> | <div style="column-count:1;-moz-column-count:1;-webkit-column-count:1"> | ||
* | * mean | ||
* | * median | ||
* | * std | ||
* | * var | ||
</div> | </div> | ||
Line 233: | Line 184: | ||
| binornd | | binornd | ||
|- | |- | ||
| | | Bivariate | ||
| bvncdf | | bvncdf | ||
| | | | ||
| | | | ||
Line 263: | Line 208: | ||
| chi2rnd | | chi2rnd | ||
|- | |- | ||
| | | Copula Family | ||
| copulacdf | | copulacdf | ||
| copulainv | | copulainv | ||
Line 269: | Line 214: | ||
| copularnd | | copularnd | ||
|- | |- | ||
| | | Extreme Value | ||
| evcdf | | evcdf | ||
| evinv | | evinv | ||
Line 359: | Line 304: | ||
| mvnrnd | | mvnrnd | ||
|- | |- | ||
| [https://en.wikipedia.org/wiki/Multivariate_t-distribution Multivariate Student's | | [https://en.wikipedia.org/wiki/Multivariate_t-distribution Multivariate Student's T] | ||
| mvtcdf mvtcdfqmc | | mvtcdf mvtcdfqmc | ||
| mvtinv | | mvtinv | ||
Line 383: | Line 328: | ||
| ncfrnd | | ncfrnd | ||
|- | |- | ||
| [https://en.wikipedia.org/wiki/Noncentral_t-distribution Noncentral Student's | | [https://en.wikipedia.org/wiki/Noncentral_t-distribution Noncentral Student's T] | ||
| nctcdf | | nctcdf | ||
| nctinv | | nctinv | ||
Line 419: | Line 364: | ||
| stdnormal_rnd | | stdnormal_rnd | ||
|- | |- | ||
| [https://en.wikipedia.org/wiki/Student%27s_t-distribution Student's | | [https://en.wikipedia.org/wiki/Student%27s_t-distribution Student's T] | ||
| tcdf | | tcdf | ||
| tinv | | tinv | ||
Line 467: | Line 412: | ||
| wishrnd | | wishrnd | ||
|} | |} | ||
=== Distribution Fitting === | === Distribution Fitting === | ||
Line 507: | Line 453: | ||
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"> | <div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"> | ||
* | * betastat | ||
* | * binostat | ||
* | * chi2stat | ||
* | * evstat | ||
* | * expstat | ||
* | * fstat | ||
* | * gamstat | ||
* | * geostat | ||
* | * gevstat | ||
* | * gpstat | ||
* | * hygestat | ||
* | * lognstat | ||
* | * nbinstat | ||
* | * ncfstat | ||
* | * nctstat | ||
* | * ncx2stat | ||
* | * normstat | ||
* | * poisstat | ||
* | * raylstat | ||
* | * fitgmdist | ||
* | * tstat | ||
* | * unidstat | ||
* | * unifstat | ||
* | * wblstat | ||
</div> | </div> | ||
== Experimental Design == | == Experimental Design == | ||
Functions available for computing design matrices. | Functions available for computing design matrices. | ||
<div style="column-count:1;-moz-column-count:1;-webkit-column-count:1"> | <div style="column-count:1;-moz-column-count:1;-webkit-column-count:1"> | ||
* | * fullfact | ||
* | * ff2n | ||
* x2fx | |||
</div> | </div> | ||
== Model Fitting == | == Model Fitting == | ||
Functions available for computing design matrices. | |||
<div style="column-count:1;-moz-column-count:1;-webkit-column-count:1"> | |||
* crossval | |||
* fitgmdist | |||
* fitlm | |||
</div> | |||
=== Cross Validation === | === Cross Validation === | ||
Line 625: | Line 511: | ||
* @cvpartition/test | * @cvpartition/test | ||
* @cvpartition/training | * @cvpartition/training | ||
</div> | </div> | ||
== Hypothesis Testing == | == Hypothesis Testing == | ||
Functions available for hypothesis testing | Functions available for hypothesis testing | ||
Line 646: | Line 521: | ||
! Description | ! Description | ||
|- | |- | ||
| | | adtest | ||
| Anderson-Darling goodness-of-fit hypothesis test. | | Anderson-Darling goodness-of-fit hypothesis test. | ||
|- | |- | ||
| | | anova1 | ||
| Perform a one-way analysis of variance (ANOVA) | | Perform a one-way analysis of variance (ANOVA) | ||
|- | |- | ||
| | | anova2 | ||
| Performs two-way factorial (crossed) or a nested analysis of variance (ANOVA) for balanced designs. | | Performs two-way factorial (crossed) or a nested analysis of variance (ANOVA) for balanced designs. | ||
|- | |- | ||
| | | anovan | ||
| Perform a multi (N)-way analysis of (co)variance (ANOVA or ANCOVA) to evaluate the effect of one or more categorical or continuous predictors (i.e. independent variables) on a continuous outcome (i.e. dependent variable). | | Perform a multi (N)-way analysis of (co)variance (ANOVA or ANCOVA) to evaluate the effect of one or more categorical or continuous predictors (i.e. independent variables) on a continuous outcome (i.e. dependent variable). | ||
|- | |- | ||
| | | bartlett_test | ||
| Perform a Bartlett test for the homogeneity of variances. | | Perform a Bartlett test for the homogeneity of variances. | ||
|- | |- | ||
| | | barttest | ||
| Bartlett's test of sphericity for correlation. | | Bartlett's test of sphericity for correlation. | ||
|- | |- | ||
| | | binotest | ||
| Test for probability P of a binomial sample | | Test for probability P of a binomial sample | ||
|- | |- | ||
| | | chi2gof | ||
| Chi-square goodness-of-fit test. | | Chi-square goodness-of-fit test. | ||
|- | |- | ||
| | | chi2test | ||
| Perform a chi-squared test (for independence or homogeneity). | | Perform a chi-squared test (for independence or homogeneity). | ||
|- | |- | ||
| | | friedman | ||
| Performs the nonparametric Friedman's test to compare column effects in a two-way layout. | | Performs the nonparametric Friedman's test to compare column effects in a two-way layout. | ||
|- | |- | ||
| | | hotelling_t2test | ||
| Compute Hotelling's T^2 ("T-squared") test for a single sample or two dependent samples (paired-samples). | | Compute Hotelling's T^2 ("T-squared") test for a single sample or two dependent samples (paired-samples). | ||
|- | |- | ||
| | | hotelling_t2test2 | ||
| Compute Hotelling's T^2 ("T-squared") test for two independent samples. | | Compute Hotelling's T^2 ("T-squared") test for two independent samples. | ||
|- | |- | ||
| | | kruskalwallis | ||
| Perform a Kruskal-Wallis test, the non-parametric alternative of a one-way analysis of variance (ANOVA). | | Perform a Kruskal-Wallis test, the non-parametric alternative of a one-way analysis of variance (ANOVA). | ||
|- | |- | ||
| | | kstest | ||
| Single sample Kolmogorov-Smirnov (K-S) goodness-of-fit hypothesis test. | | Single sample Kolmogorov-Smirnov (K-S) goodness-of-fit hypothesis test. | ||
|- | |- | ||
| | | kstest2 | ||
| Two-sample Kolmogorov-Smirnov goodness-of-fit hypothesis test. | | Two-sample Kolmogorov-Smirnov goodness-of-fit hypothesis test. | ||
|- | |- | ||
| | | levene_test | ||
| Perform a Levene's test for the homogeneity of variances. | | Perform a Levene's test for the homogeneity of variances. | ||
|- | |- | ||
| | | manova1 | ||
| One-way multivariate analysis of variance (MANOVA). | | One-way multivariate analysis of variance (MANOVA). | ||
|- | |- | ||
| | | ranksum | ||
| Wilcoxon rank sum test for equal medians. This test is equivalent to a Mann-Whitney U-test. | | Wilcoxon rank sum test for equal medians. This test is equivalent to a Mann-Whitney U-test. | ||
|- | |- | ||
| | | regression_ftest | ||
| F-test for General Linear Regression Analysis | | F-test for General Linear Regression Analysis | ||
|- | |- | ||
| | | regression_ttest | ||
| Perform a linear regression t-test. | | Perform a linear regression t-test for the null hypothesis ''RR * B = R'' in a classical normal regression model ''Y = X * B + E''. | ||
|- | |- | ||
| | | runstest | ||
| Runs test for detecting serial correlation in the vector X. | | Runs test for detecting serial correlation in the vector X. | ||
|- | |- | ||
| | | sampsizepwr | ||
| Sample size and power calculation for hypothesis test. | | Sample size and power calculation for hypothesis test. | ||
|- | |- | ||
| | | signtest | ||
| Test for median. | | Test for median. | ||
|- | |- | ||
| | | ttest | ||
| Test for mean of a normal sample with unknown variance or a paired-sample t-test. | | Test for mean of a normal sample with unknown variance or a paired-sample t-test. | ||
|- | |- | ||
| | | ttest2 | ||
| Perform a two independent samples t-test. | | Perform a two independent samples t-test. | ||
|- | |- | ||
| | | vartest | ||
| One-sample test of variance. | | One-sample test of variance. | ||
|- | |- | ||
| | | vartest2 | ||
| Two-sample F test for equal variances. | | Two-sample F test for equal variances. | ||
|- | |- | ||
| | | vartestn | ||
| Test for equal variances across multiple groups. | | Test for equal variances across multiple groups. | ||
|- | |- | ||
| | | ztest | ||
| One-sample Z-test. | | One-sample Z-test. | ||
|} | |} | ||
== Wrappers == | == Wrappers == | ||
Functions available for wrapping other functions or group of functions. | Functions available for wrapping other functions or group of functions. | ||
Line 895: | Line 618: | ||
! Description | ! Description | ||
|- | |- | ||
| | | cdf | ||
| This is a wrapper | | This is a wrapper around various NAMEcdf and NAME_cdf functions. | ||
|- | |- | ||
| | | clusterdata | ||
| | | Wrapper function for 'linkage' and 'cluster'. | ||
|- | |- | ||
| | | pdf | ||
| This is a wrapper | | This is a wrapper around various NAMEpdf and NAME_pdf functions. | ||
|- | |- | ||
| | | pdf | ||
| Generates pseudo-random numbers from a given one-, two-, or three-parameter distribution. | | Generates pseudo-random numbers from a given one-, two-, or three-parameter distribution. | ||
|} | |} |