Vous êtes sur la page 1sur 9

Appendix E

MATLAB Statistics Toolbox


The following tables list the functions that are available in the MATLAB Statistics Toolbox, Version 3.0. This toolbox is available for purchase from The MathWorks, Inc.

TABL ABLE E.1


Functions for Parameter Estimation (fit) and Distribution Statistics Mean and Variance (stat)
Function betafit, betastat binofit, binostat expfit, expstat fstat gamfit, gamstat geostat hygestat lognstat mle nbinstat ncfstat nctstat ncx2stat normfit, normstat poissfit, poisstat raylfit tstat unidstat unifit, unifstat weibfit, weibstat Beta distribution. Binomial distribution. Exponential distribution. F distribution Gamma distribution. Geometric distribution Hypergeometric distribution Lognormal distribution Maximum likelihood parameter estimation. Negative binomial distribution Noncentral F distribution Noncentral t distribution Noncentral Chi-square distribution Normal distribution. Poisson distribution. Rayleigh distribution. T distribution Discrete uniform distribution Uniform distribution. Weibull distribution. Purpose

2002 by Chapman & Hall/CRC

548

Computational Statistics Handbook with MATLAB

TABLE E.2
Probability Density Functions (pdf) and Cumulative Distribution Functions (cdf)
Function betapdf, betacdf binopdf, binocdf chi2pdf, chi2cdf exppdf, expcdf fpdf, fcdf gampdf, gamcdf geopdf, geocdf hygepdf, hygecdf lognpdf, logncdf nbinpdf, nbincdf ncfpdf, ncfcdf nctpdf, nctcdf ncx2pdf, ncx2cdf normpdf, normcdf pdf, cdf poisspdf, poisscdf raylpdf, raylcdf tpdf, tcdf unidpdf, unidcdf unifpdf, unifcdf weibpdf, weibcdf Beta distribution Binomial distribution Chi-square distribution Exponential distribution F distribution Gamma distribution Geometric distribution Hypergeometric distribution Log normal distribution Negative binomial distribution Noncentral F distribution Noncentral t distribution Noncentral chi-square distribution Normal distribution Probability density/Cumulative distribution Poisson distribution Rayleigh distribution T distribution Discrete uniform distribution Continuous uniform distribution Weibull distribution Purpose

2002 by Chapman & Hall/CRC

Appendix E: MATLAB Statistics Toolbox

549

TABLE E.3
Critical Values (inv) and Random Number Generation (rnd) for Probability Distribution Functions
Function betainv, betarnd binoinv, binornd chi2inv, chi2rnd expinv, exprnd finv, frnd gaminv, gamrnd geoinv, geornd hygeinv, hygernd logninv, lognrnd nbininv, nbinrnd ncfinv, ncfrnd nctinv, nctrnd ncx2inv, ncx2rnd norminv, normrnd poissinv, poissrnd raylinv, raylrnd tinv, trnd unidinv, unidrnd unifinv, unifrnd weibinv, weibrnd icdf Beta distribution Binomial distribution Chi-square distribution Exponential distribution F distribution Gamma distribution Geometric distribution Hypergeometric distribution Log normal distribution Negative binomial distribution Noncentral F distribution Noncentral t distribution Noncentral chi-square distribution Normal distribution Poisson distribution Rayleigh distribution T distribution Discrete uniform distribution Continuous uniform distribution Weibull distribution Specified inverse cdf Purpose

2002 by Chapman & Hall/CRC

550

Computational Statistics Handbook with MATLAB

TABLE E.4
Descriptive Statistics
Function bootstrp corrcoef Purpose Bootstrap statistics for any function. Correlation coefficient - also in standard MATLAB Covariance - also in standard MATLAB Cross tabulation Geometric mean Summary statistics by group Harmonic mean Interquartile range Kurtosis Median absolute deviation Sample average - also in standard MATLAB Second quartile (50th percentile) of a sample - also in standard MATLAB Moments of a sample Maximum/minimum - ignoring NaNs Mean/median - ignoring NaNs Standard deviation/sum - ignoring NaNs Percentiles Range Skewness Standard deviation - also in standard MATLAB Frequency table Trimmed mean Variance - also in standard MATLAB

cov crosstab geomean grpstats harmmean iqr kurtosis mad mean median

moment nanmax, nanmin nanmean, nanmedian nanstd, namsum prctile range skewness std tabulate trimmean var

2002 by Chapman & Hall/CRC

Appendix E: MATLAB Statistics Toolbox

551

TABLE E.5
Linear Models
Function anova1 anova2 anovan aoctool dummyvar friedman glmfit kruskalwallis lscov Purpose One-way analysis of variance Two-way analysis of variance n-way analysis of variance Interactive tool for analysis of covariance Dummy-variable coding Friedmans test Generalized linear model fitting Kruskal-Wallis test Least-squares estimates with known covariance matrix One-way multivariate analysis of variance Draw clusters of group means for manova1 Multiple comparisons of means and other estimates Polynomial evaluation and confidence interval estimation Least-squares polynomial fitting- also in standard MATLAB Predicted values for polynomial functions- also in standard MATLAB Residuals case order plot Multivariate linear regression Regression diagnostics Ridge regression Robust regression model fitting Multidimensional response surface visualization Interactive tool for stepwise regression Factor setting matrix (x) to design matrix (fx)

manoval manovacluster multcompare

polyconf

polyfit

polyval

rcoplot regress regstats ridge robustfit rstool stepwise x2fx

2002 by Chapman & Hall/CRC

552

Computational Statistics Handbook with MATLAB

TABLE E.6
Nonlinear Models
Function nlinfit Purpose Nonlinear least-squares data fitting (Newtons Method) Interactive graphical tool for prediction in nonlinear models Confidence intervals for prediction Confidence intervals for parameters Non-negative least-squares

nlintool

nlpredci nlparci nnls

TABLE E.7
Cluster Analysis
Function pdist squareform linkage dendrogram inconsistent cophenet cluster clusterdata Purpose Pairwise distance between observations Square matrix formatted distance Hierarchical cluster information Generate dendrogram plot Inconsistent values of a cluster tree Cophenetic coefficient Construct clusters from linkage output Construct clusters from data

2002 by Chapman & Hall/CRC

Appendix E: MATLAB Statistics Toolbox

553

TABLE E.8
Design of Experiments (DOE) and Statistical Process Control (SPC)
Function cordexch Purpose D-optimal design (coordinate exchange algorithm) Augment D-optimal design D-optimal design with fixed covariates Two-level full-factorial design Two-level fractional factorial design Mixed-level full-factorial design Hadamard matrices (orthogonal arrays) D-optimal (row exchange algorithm) Capability indices Capability plot Exponentially weighted moving average plot Histogram with superimposed normal density Plot normal density between specification limits S chart for monitoring variability Xbar chart for monitoring the mean

daugment dcovary ff2n fracfact fullfact hadamarad rowexch capable capaplot ewmaplot histfit normspec schart xbarplot

TABLE E.9
Multivariate Statistics and Principal Component Analysis
Function classify mahal manova1 barttest pcacov pcares princomp Purpose Linear discriminant analysis Mahalanobis distance One-way multivariate analysis of variance Bartletts test for dimensionality Principal components from covariance matrix Residuals from principal components Principal component analysis from raw data

2002 by Chapman & Hall/CRC

554

Computational Statistics Handbook with MATLAB

TABLE E.1 E.10


Hypothesis Tests
Function ranksum signrank signtest ztest ttest ttest2 jbtest kstest kstest2 lillietest Purpose Wilcoxon rank sum test (independent samples) Wilcoxon sign rank test (paired samples) Sign test (paired samples) Z test One sample t test Two sample t test Jarque-Bera test of normality Kolmogorov-Smirnov test for one sample Kolmogorov-Smirnov test for two samples Lilliefors test of normality

TABLE E.1 E.11


Statistical Plotting
Function cdfplot fsurfht gline gname gplotmatrix Purpose Plot of empirical cumulative distribution function Interactive contour plot of a function Point, drag and click line drawing on figures Interactive point labeling in x-y plots Matrix of scatter plots grouped by a common variable Scatter plot of two variables grouped by a third Add least-square fit line to scatter plot Normal probability plot Quantile-quantile plot Reference polynomial curve Reference line Interactive contour plot of a data grid Weibull probability plot

gscatter lsline normplot qqplot refcurve refline surfht weibplot

2002 by Chapman & Hall/CRC

Appendix E: MATLAB Statistics Toolbox

555

TABLE E.1 E.12


Statistics Demos
Function aoctool disttool Purpose Interactive tool for analysis of covariance GUI tool for exploring probability distribution functions Generalized linear model slide show Interactive graph for prediction of fitted polynomials GUI tool for generating random numbers Reaction simulation Interactive tool to compare robust and least squares fits

glmdemo polytool

randtool rsmdemo robustdemo

TABLE E.1 E.13


File-based I/O
Function tblread tblwrite tdfread Purpose Read in data in tabular format Write out data in tabular format in file Read in text and numeric data from tab-delimited file Read in case names Write out case names to file

caseread casewrite

2002 by Chapman & Hall/CRC