Real Statistics Release 8.7

The primary focus of this release is the addition of new non-parametric tests.
.
The following is an overview of the new features in Release 8.7. You can click on the link to obtain more information about each new feature.
.
Association Tests
.
The new release calculates the lambda measure of asymmetric association for categorical variables, the gamma measure of symmetric association for ordinal variables, and Somers’ d measure of asymmetric association for ordinal variables. In each case, the data is in the form of a contingency table; in addition to calculating the relevant statistic, this statistic is used for hypothesis testing, and a confidence interval is produced.
.
In particular, the new release adds the following worksheet functions where R1 is a contingency table.
.

LAMBDA_COEFF(R1, lab): returns a column array with lambda(C|R), lambda(R|C), and symmetric lambda for the data in R1.

LAMBDA_TEST(R1, lab, alpha, lambda0): returns a column array with lambda(C|R), standard error, z-stat, p-value, and lower and upper ends of the 1-alpha confidence interval.

GAMMA_TEST(R1, lab, alpha, gamma0): returns a column array with gamma, # of concordance pairs, # of discordance pairs, standard error, z-statistic, p-value, and the lower and upper ends of the 1-alpha confidence interval for gamma.
.
SOMERS_TEST(R1, lab, alpha, d0): returns a column array with Somers’ d, # of concordance pairs, # of discordance pairs, standard error, z-statistic, p-value, and the lower and upper ends of the 1-alpha confidence interval for d.
.
MSOMERS(R1): returns the M statistic used to calculate the variance of Somers’ d.
,
CONCORD(R1): returns the number of concordant pairs in R1
.
DISCORD(R1): return the number of discordant pairs in R1
.
The new release also adds an Association Tests data analysis tool (to the Corr tab) that provides the same capabilities.
.
Permutation tests
.
When the assumptions for the t-test are not met, the following permutation tests are now supported: (1) two independent sample permutation test (PERM2_TEST) and (2) permutation test for one sample or paired samples (PERM_TEST). These tests are substitutes for the Mann-Whiney and Wilcoxon Signed Ranks tests for relatively small samples.
.
In particular, the following two new worksheet functions have been added:
.
PERM_TEST(R1, R2, tails) = the p-value of the permutation test for the paired data in column arrays R1 and R2.
.
PERM_TEST(R1, hyp, tails) = the p-value of the permutation test for the data in column array R1 against the hypothetical median hyp (if hyp is omitted, it defaults to zero).
.
PERM2_TEST(R1, R2, tails) = the p-value of the permutation test for the data in column arrays R1 and R2.
.
Non-parametric tests of equal variability
.
When the normality assumption for the F-test to determine whether two samples come from populations with equal variances is not met, then we can use one of the following non-parametric tests: Siegal-Tukey test or Moses’ test. These tests are supported in this release via the following worksheet functions where R1 and R2 are column arrays containing data from two independent samples:
.
ST_TEST(R1, R2, lab, tails, ties, cont): returns a column array with the values U, z, r effect size, and p-value.
.
MOSES_TEST(R1, R2, ngrpslab, tails, ties, cont, exact, iter): returns a column array with the values U, z, r effect size, and three types of p-values based on subsamples of size ngrps.
.
Non-parametric Repeated Measures ANOVA with Trend
.
Page’s Test extends Friedman’s non-parametric repeated-measures ANOVA procedure to determine not only whether the within-subjects factor groups are different, but whether they demonstrate a significant trend, e.g. m1 ≥ m2 ≥ … ≥ mk or m1 ≤ m2 ≤ … ≤ mk.

In particular, the new release supports the following worksheet function where R1 is an array or cell range that contains the repeated measures ANOVA data:

PAGE_TEST(R1, lab, tails, lookup): returns a column array with the values L-stat, z, p-value, and rho.

In addition, the following table lookup functions are provided for small samples.

PageCRIT(k, n, alpha, interp) = critical for Page’s L test at alpha where the number of within-subject groups is k and the number of subjects is n based on a table of critical values.

PagePROB(L, k, n, iter, interp, txt) = p-value for Page’s L test where the number of within-subject groups is k and the number of subjects is n for the specified value of Page’s L statistic based on a table of critical values.

Non-parametric Pairwise Ratings and Comparisons

The new release includes Kendall’s u test for pairwise ratings and comparisons and the TC correlation and test. This is accomplished via the following new worksheet functions:

KENDALLU(R1, lab, comp, alpha, lookup): returns a column array with u-stat, W-stat, χ2-stat, df, and p-value for Kendall’s u test on the square preference matrix in R1 (without headings).

TC_TEST(R1, lab, alpha, lookup): returns a column array with TC-stat, z-stat, and p-value for Kendall’s TC test on the square preference matrix in R1 (without headings).

PREF_MATRIX(R1): returns an n × n preference matrix corresponding to the rankings in a k × n array or range R1 that contains the rankings for n subjects by k raters.

In addition, the following table lookup functions are provided for small samples.

KENDALLU_PROB(k, n, u) = p-value for Kendall’s u test for paired comparisons when the number of raters is k and the number of subjects being rated is n for the specified value of u.

TC_PROB(k, n, TC) = p-value for Kendall’s TC test when the number of judges is k and the number of criteria being rated is n for the specified value of TC.

Change Point Test

The new release offers a test that determines whether a time series has a point that significantly changes the median of the series. This is accomplished via the following two new worksheet functions where R1 is a column array containing time series data.

CHANGEPT_TEST(R1, lab): returns a column array with the values: change point, w-stat, z-stat, and p-value.

CHANGEPT_BTEST(R1, lab, dist, alpha): returns a column array with the values: change point, D-stat, D-crit, and p-value for a time series with binary data.

Hausman’s Test

This release supports Hausman’s test, which helps to determine whether a fixed effects (FEM) or random effects model (REM) is better for analyzing panel data. In particular, this release provides the following new worksheet function where R1 contains balanced panel data.

HAUSMAN(R1, periods, lab): returns a column array with the values H, df, and p-value for Hausman’s test on the data in R1 based on periods number of time periods per unit. If lab = TRUE then a column of labels is appended to the output (default FALSE).

Negative Binomial Fit

This release supplies the following new functions to fit data to a negative binomial distribution using either the method of moments or maximum log-likelihood estimate. Here R1 is a column array or range containing the data.

NEGBINOM_FITM(R1, lab, pure) = returns an array with the negative binomial distribution parameter values k, p, and MLE using the method of moments. k doesn’t need to take an integer value.

NEGBINOM_FIT(R1, lab) = returns an array with the negative binomial distribution parameter values k and p, the actual and estimated mean and variance, and MLE. k takes an integer value between 2 and 1,000.

Non-parametric Regression

The new release also includes the following worksheet function that computes the slope and intercept for a simple linear regression model y = mx + b using the non-parametric approach of Kendall-Theil-Sen.

KTSReg(Rx, Ry, lab, mopt, bopt, alpha): returns a column array with the values: slope, s.e. for the slope, intercept, and the confidence intervals of the slope and intercept

Enhancements to PERCENTILE_EXC and QUARTILE_EXC

The existing PERCENTILE_EXC and QUARTILE_EXC worksheet functions support types 4-9 of the Hyndman-Fan approach to calculating percentiles and quartiles. This release adds support for types 1-3, i.e. the discontinuous approaches to percentiles and quartiles.

Enhancement to MED

The existing MED(R1, R2) worksheet function that calculates the median of the data in R1 based on the weights in R2 has been enhanced to allow R2 to be replaced by a formula that computes an array.

Bug Fix

Fixed an error in the calculation of the FRECHET_INV function.