| Statistics Toolbox Release Notes |      | 
Linear Model Functions
Linear model functions (e.g., anova1, polyval, etc.) ignore observations with NaN value in the X or Y input.
betafit
The betafit function now:
NaN data before fitting
0 or 1 values
x is constant
boxplot
The second syntax for boxplot above is new. The first syntax displays a box for each column of the x matrix. The second syntax displays a box for each level of the grouping variable g. In addition, g can be a cell array of grouping variables to produce a separate box for each unique combination of grouping variable levels. See grpstats.
cluster
The cluster function adds a flag argument which overrides the default meaning of the cutoff argument. If flag is 'inconsistent', then cutoff is interpreted as a threshold for the inconsistency coefficient. If flag is 'clusters', then cutoff is the maximum number of clusters.
crosstab
The crosstab function now accepts any number of inputs, not just two. Each input can be a numeric vector, a string array, or a cell array of strings. (In the previous release each input had to be a vector of positive integers taking values 1, ..., g for some g.) If there are v input variables, the output table is a v-dimensional array, with table(i,j,k,...) counting the number of times that the first argument takes its ith value, that the second argument takes its jth value, that the third argument takes its kth value, and so on. 
For the case of two positive integer input arguments, the function yields the same results as the previous release unless there are missing integers (i.e., not all of 1, ..., g appear in the input). In that case, the previous release would have produced a divide-by-zero warning and would have generated a row or column of zeros in table. The new version simply does not consider that category, so it does not reserve zeros for it.
As in the previous release, chi2 is a chi-square statistic for testing independence, and p is its p-value. In this release, table can be other than a two-dimensional table, and the test is that all dimensions are independent. 
The labels output is a cell array with one column for each input argument. The column lists the values of that input. Revisiting the example above, table(i,j,k,...) counts the number of times that the first argument takes the value labels{i,1}, that the second argument takes the value labels{j,2}, that the third argument takes the value labels{k,3}, and so on.
ewmaplot
The ewmaplot default for alpha changed to 0.27% to conform to the standard ewma chart definition.
grpstats
The grpstats argument group is no longer restricted to be a vector of integers. It can be a grouping variable that is a numeric vector, a string matrix, or a cell array of strings. In addition it can be a cell array containing multiple group vectors. The function computes statistics on groups defined by unique combinations of levels of the grouping variables. The new output gname is a cell array with one row per group and one column per grouping variable. Elements of means, sem, and counts are statistics calculated for the group defined by values in the corresponding row of gname. Examples include
nlinfit
The nlinfit function now accepts inline functions and function handles (@FF) in addition to the text strings ('FF') accepted in the past for input fun.
nlintool
The interface invoked with the nlintool function now:
x values simultaneously) or nonsimultaneous (provide that level for a single predetermined x value). They can apply to the estimated regression function only (not taking account any variability from a new observation) or to a prediction for a new observation (taking its variability into account).
@FF) in addition to the text strings ('FF') accepted in the past for input fun.
nlpredci
The nlpredci function has new arguments that allow the same types of confidence intervals produced by nlintool.
norminv
The norminv function now returns NaN for each element of p that is NaN.
normplot
The normplot function now strips NaN values individually from each column of x.
normrnd
The normrnd function now returns the mean if sigma is 0.
polytool
The interface invoked by the polytool function has the following enhancements:
x(j) and y(j) if either is NaN, and display a warning when doing so.
x values simultaneously) or nonsimultaneous (provide that level for a single predetermined x value). They can apply to the estimated regression function only (not taking account any variability from a new observation) or to a prediction for a new observation (taking its variability into account).
prctile
The prctile function now strips NaN values individually from each column of x.
qqplot
The qqplot function now:
NaN values individually from each column of x and y.
y is omitted, uses standard normal quantiles.
ranksum
New ranksum output stats is a structure that always contains a field named ranksum whose value is the value of the rank sum statistic, and that for large samples contains a field named zval that is the value of the normal (Z) statistic used to compute the p-value p.
schart
The schart default for conf changed to 99.73% to conform to the standard s-chart definition.
signrank
The signrank function has the following enhancements:
y is a scalar, extend it to the same length as x. This facilitates comparison of the median of one sample to a constant value. 
x and y are the same, return p=1 and h=0.
p=alpha, now h=1 rather than h=0 (rejects hypothesis).
stats is a structure that always contains a field named signed rank whose value is the value of the signed rank statistic, and that for large samples contains a field named zval that is the value of the normal (Z) statistic used to compute the p-value p.
signtest
The signtest function has the following enhancements:
p=alpha, now h=1 rather than h=0 (rejects hypothesis)
stats is a structure that always contains a field named sign whose value is the value of the sign statistic, and that for large samples contains a field named zval that is the value of the normal (Z) statistic used to compute the p-value p. Z is signed, not an absolute value.
tcdf, tinv, tpdf, trnd, tstat
The tcdf, tinv, tpdf, trnd, and tstat functions now accept noninteger degrees of freedom.
ttest
The ttest function has these enhancements:
stats, the value of the t statistic and its degrees of freedom.
NaN from x before starting test.
ttest2
The ttest2 function has these enhancements:
stats, the value of the t statistic and its degrees of freedom.
tail is 1 or -1, now ci has one endpoint set to Inf or -Inf. 
NaN from x and y before starting test.
weibplot
The weibplot function strips NaN values individually from each column of x.
xbarplot
The xbarplot function has these enhancements:
conf to 99.73%, to conform to the standard x-bar chart definition.
conf the control limits are three-sigma limits.
sigmaest specifies how to estimate sigma in the control limit calculation. The default is 'std', meaning estimate using the average of the subgroup standard deviations. The value 'variance' uses a pooled variance estimate; this was the value used in previous releases. The value 'range' uses the average of the subgroup ranges, and requires subgroups with no more than 25 observations.
ztest
The ztest function has these enhancements:
zval, the value of the test statistic.
tail is 1 or -1, now ci has one endpoint set to Inf or -Inf. 
NaN from x before starting test.
![]()  | Updated Functions for ANOVA-Type Tables |