PAIRTEST procedure

Performs t-tests for pairwise differences (P.W. Goedhart).


Options

PRINT = strings
What to print (differences, sed, tvalues, tprobabilities); default diff, sed, tval

DF = scalar
Degrees of freedom for calculation of TPROBABILITIES from TVALUES; default 10000, approximates to the normal distribution

SORT = string
Whether ESTIMATES (and other output) are sorted in ascending order (yes, no); default no


Parameters

ESTIMATES = variates
Estimates to be compared

VCOVARIANCE = symmetric matrices
Symmetric matrix containing the variance-covariance matrix of the estimates

LABELS = texts
Text vector naming the elements of ESTIMATES; if unset, the numbers 1, 2... are used as labels

DIFFERENCES = symmetric matrices
To save the pairwise differences (ESTIMATES on the diagonal)

SED = symmetric matrices
To save the standard errors of the pairwise differences (missing values on the diagonal)

TVALUES = symmetric matrices
To save the t-values (missing values on the diagonal)

TPROBABILITIES = symmetric matrices
To save the t-probabilities (missing values on the diagonal)


Description

PAIRTEST can be used to test all pairwise differences in every situation in which a vector of estimates and a corresponding variance-covariance matrix are available. PAIRTEST is particularly useful for tests of all pairwise differences of slopes after fitting a model with an interaction between a factor and a variate. In most other situations procedure RPAIR will be more suitable.

   All pairwise differences of entries in ESTIMATES with variance-covariance matrix VCOVARIANCE are calculated and tested. The results of these tests can be saved in symmetric matrices DIFFERENCES, SED, TVALUES and TPROBABILITIES. The matrices are labeled by text vector LABELS or, if LABELS is unset, by the numbers 1, 2, 3...

   PRINT controls the output of PAIRTEST. The t-probabilities are based on DF degrees of freedom; by default, if DF has not been set, normal probablitities are calculated. Option SORT controls whether the estimates on the diagonal of DIFFERENCES are sorted in ascending order. The other output is sorted accordingly.


Options: PRINT, DF, SORT.

Parameters: ESTIMATES, VCOVARIANCE, LABELS, DIFFERENCES, SED, TVALUES, TPROBABILITIES.


Method

The calculations are all relatively straightforward.


Action with RESTRICT

The variate ESTIMATES and the text LABELS can be restricted; the analysis is restricted according to restrictions on ESTIMATES. The lengths of the unrestricted vectors ESTIMATES and LABELS must be identical.