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 26: | Line 26: | ||
| [https://gnu-octave.github.io/statistics/confusionmat.html confusionmat] | | [https://gnu-octave.github.io/statistics/confusionmat.html confusionmat] | ||
| Compute a confusion matrix for classification problems. | | Compute a confusion matrix for classification problems. | ||
|- | |- | ||
| [https://gnu-octave.github.io/statistics/cophenet.html cophenet] | | [https://gnu-octave.github.io/statistics/cophenet.html cophenet] | ||
Line 59: | Line 56: | ||
| [https://gnu-octave.github.io/statistics/pdist2.html pdist2] | | [https://gnu-octave.github.io/statistics/pdist2.html pdist2] | ||
| Compute pairwise distance between two sets of vectors. | | Compute pairwise distance between two sets of vectors. | ||
|- | |- | ||
| [https://gnu-octave.github.io/statistics/slicesample.html slicesample] | | [https://gnu-octave.github.io/statistics/slicesample.html slicesample] | ||
Line 97: | Line 91: | ||
| Randomly sample data. | | Randomly sample data. | ||
|- | |- | ||
| | | https://gnu-octave.github.io/statistics/grp2idx.html grp2idx] | ||
| Get index for group variables. | | Get index for group variables. | ||
|- | |- | ||
| [https://gnu-octave.github.io/statistics/tabulate.html tabulate] | | [https://gnu-octave.github.io/statistics/tabulate.html tabulate] | ||
Line 128: | Line 107: | ||
! Function | ! Function | ||
! Description | ! Description | ||
|- | |- | ||
| [https://gnu-octave.github.io/statistics/geomean.html geomean] | | [https://gnu-octave.github.io/statistics/geomean.html geomean] | ||
Line 171: | Line 147: | ||
=== In external packages === | === In external packages === | ||
<code>bootci</code>, <code>bootstrp</code> are implemented in the [https://gnu-octave.github.io/packages/statistics- | <code>bootci</code>, <code>bootstrp</code> are implemented in the [https://gnu-octave.github.io/packages/statistics-bootstrap statistics-bootstrap] package. | ||
=== Shadowing Octave core functions === | === Shadowing Octave core functions === | ||
Line 233: | Line 209: | ||
| binornd | | binornd | ||
|- | |- | ||
| [https://en.wikipedia.org/wiki/Joint_probability_distribution Bivariate | | [https://en.wikipedia.org/wiki/Joint_probability_distribution Bivariate] | ||
| bvncdf | | bvncdf | ||
| | | | ||
| | | | ||
Line 359: | Line 329: | ||
| 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 353: | ||
| 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 389: | ||
| 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 534: | Line 504: | ||
== Experimental Design == | == Experimental Design == | ||
Functions available for computing design matrices. | Functions available for computing design matrices. | ||
Line 555: | Line 523: | ||
| Convert predictors to design matrix. | | Convert predictors to design matrix. | ||
|} | |} | ||
== Model Fitting == | == Model Fitting == | ||
Functions available for fitting or evaluating statistical models. | Functions available for fitting or evaluating statistical models. | ||
Line 637: | Line 566: | ||
== Hypothesis Testing == | == Hypothesis Testing == | ||
Functions available for hypothesis testing | Functions available for hypothesis testing | ||
Line 646: | Line 573: | ||
! 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). | ||
|- | |- | ||
| | | multcompare | ||
| Perform posthoc multiple comparison tests or p-value adjustments to control the family-wise error rate (FWER) or false discovery rate (FDR). | | Perform posthoc multiple comparison tests or p-value adjustments to control the family-wise error rate (FWER) or false discovery rate (FDR). | ||
|- | |- | ||
| | | 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. | ||
|} | |} | ||
Line 753: | Line 671: | ||
* <code>fishertest</code> | * <code>fishertest</code> | ||
* <code>meanEffectSize</code> | * <code>meanEffectSize</code> | ||
</div> | |||
== Machine Learning == | |||
=== Available functions === | |||
The following table lists the available functions. | |||
{| class="wikitable" | |||
! Function | |||
! Description | |||
|- | |||
| hmmestimate | |||
| Estimation of a hidden Markov model for a given sequence. | |||
|- | |||
| hmmgenerate | |||
| Output sequence and hidden states of a hidden Markov model. | |||
|- | |||
| hmmviterbi | |||
| Viterbi path of a hidden Markov model. | |||
|- | |||
| svmpredict | |||
| Perform a K-means clustering of an NxD matrix. | |||
|- | |||
| svmtrain | |||
| Produce a hierarchical clustering dendrogram. | |||
|} | |||
=== TODO list === | |||
Update <code>svmpredict</code> and <code>svmtrain</code> to libsvm 3.0. | |||
Missing functions: | |||
<div style="column-count:1;-moz-column-count:1;-webkit-column-count:1"> | |||
* <code>hmmdecode</code> | |||
* <code>hmmtrain</code> | |||
</div> | </div> | ||
Line 765: | Line 720: | ||
! Description | ! Description | ||
|- | |- | ||
| | | boxplot | ||
| Produce a box plot. | | Produce a box plot. | ||
|- | |- | ||
| | | cdfplot | ||
| Display an empirical cumulative distribution function. | | Display an empirical cumulative distribution function. | ||
|- | |- | ||
| | | confusionchart | ||
| Display a chart of a confusion matrix. | | Display a chart of a confusion matrix. | ||
|- | |- | ||
| | | dendrogram | ||
| Plot a dendrogram of a hierarchical binary cluster tree. | | Plot a dendrogram of a hierarchical binary cluster tree. | ||
|- | |- | ||
| | | ecdf | ||
| Empirical (Kaplan-Meier) cumulative distribution function. | | Empirical (Kaplan-Meier) cumulative distribution function. | ||
|- | |- | ||
| | | gscatter | ||
| Draw a scatter plot with grouped data. | | Draw a scatter plot with grouped data. | ||
|- | |- | ||
| | | histfit | ||
| Plot histogram with superimposed fitted normal density. | | Plot histogram with superimposed fitted normal density. | ||
|- | |- | ||
| | | hist3 | ||
| Produce bivariate (2D) histogram counts or plots. | | Produce bivariate (2D) histogram counts or plots. | ||
|- | |- | ||
| | | manovacluster | ||
| Cluster group means using manova1 output. | | Cluster group means using manova1 output. | ||
|- | |- | ||
| | | normplot | ||
| Produce normal probability plot of the data. | | Produce normal probability plot of the data. | ||
|- | |- | ||
| | | ppplot | ||
| | | Produce a probability plot. | ||
|- | |- | ||
| | | qqplot | ||
| | | Produce an empirical quantile-quantile plot. | ||
|- | |- | ||
| | | silhouette | ||
| Compute the silhouette values of clustered data and show them on a plot. | | Compute the silhouette values of clustered data and show them on a plot. | ||
|- | |- | ||
| | | violin | ||
| Produce a Violin plot of the data. | | Produce a Violin plot of the data. | ||
|- | |- | ||
| | | wblplot | ||
| Plot a column vector DATA on a Weibull probability plot using rank regression. | | Plot a column vector DATA on a Weibull probability plot using rank regression. | ||
|} | |} | ||
Line 834: | Line 789: | ||
! Description | ! Description | ||
|- | |- | ||
| | | canoncorr | ||
| Canonical correlation analysis. | | Canonical correlation analysis. | ||
|- | |- | ||
| | | cholcov | ||
| Cholesky-like decomposition for covariance matrix. | | Cholesky-like decomposition for covariance matrix. | ||
|- | |- | ||
| | | dcov | ||
| Distance correlation, covariance and correlation statistics. | | Distance correlation, covariance and correlation statistics. | ||
|- | |- | ||
| | | logistic_regression | ||
| Perform ordinal logistic regression. | | Perform ordinal logistic regression. | ||
|- | |- | ||
| | | monotone_smooth | ||
| Produce a smooth monotone increasing approximation to a sampled functional dependence. | | Produce a smooth monotone increasing approximation to a sampled functional dependence. | ||
|- | |- | ||
| | | pca | ||
| Performs a principal component analysis on a data matrix. | | Performs a principal component analysis on a data matrix. | ||
|- | |- | ||
| | | pcacov | ||
| Perform principal component analysis on the NxN covariance matrix X | | Perform principal component analysis on the NxN covariance matrix X | ||
|- | |- | ||
| | | pcares | ||
| Calculate residuals from principal component analysis. | | Calculate residuals from principal component analysis. | ||
|- | |- | ||
| | | plsregress | ||
| Calculate partial least squares regression using SIMPLS algorithm. | | Calculate partial least squares regression using SIMPLS algorithm. | ||
|- | |- | ||
| | | princomp | ||
| Performs a principal component analysis on a NxP data matrix. | | Performs a principal component analysis on a NxP data matrix. | ||
|- | |- | ||
| | | regress | ||
| Multiple Linear Regression using Least Squares Fit. | | Multiple Linear Regression using Least Squares Fit. | ||
|- | |- | ||
| | | regress_gp | ||
| Linear scalar regression using gaussian processes. | | Linear scalar regression using gaussian processes. | ||
|- | |- | ||
| | | stepwisefit | ||
| Linear regression with stepwise variable selection. | | Linear regression with stepwise variable selection. | ||
|} | |} | ||
Line 886: | Line 841: | ||
== 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 848: | ||
! Description | ! Description | ||
|- | |- | ||
| | | cdf | ||
| This is a wrapper | | This is a wrapper around various NAMEcdf and NAME_cdf functions. | ||
|- | |- | ||
| | | pdf | ||
| This is a wrapper | | This is a wrapper around various NAMEpdf and NAME_pdf functions. | ||
|- | |- | ||
| | | random | ||
| 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. | ||
|} | |} | ||
=== TODO list === | |||
Update <code>cdf</code>, <code>pdf</code>, and <code>random</code> to include the latest changes in distribution functions available in statistics-1.5.3. | |||
Missing functions: | |||
<div style="column-count:1;-moz-column-count:1;-webkit-column-count:1"> | |||
* <code>icdf</code> | |||
</div> | |||
[[Category:Packages]] | [[Category:Packages]] | ||
[[Category:Missing functions]] | [[Category:Missing functions]] |