IMSL_MULTICOMP
Syntax | Return Value | Arguments | Keywords | Discussion | Example | Version History
The IMSL_MULTICOMP function performs Student-Newman-Keuls multiple-comparisons test.
Note
This routine requires an IDL Advanced Math and Stats license. For more information, contact your ITT Visual Information Solutions sales or technical support representative.
Syntax
Result = IMSL_MULTICOMP(means, df, std_error [, ALPHA=value]
[, /DOUBLE])
Return Value
A one-dimensional array of length N_ELEMENTS(means) indicating the size of the groups of means declared to be equal. If the i-th element of the returned array is equal to j, then the i-th smallest mean and the next j – 1 larger means are declared equal. If the i-th element of the returned array is equal to 0, then no group of means starts with the i-th smallest mean.
Arguments
df
Degrees of freedom associated with std_error.
means
One-dimensional array containing the means.
std_error
Effective estimated standard error of a mean. In fixed effects models, std_error equals the estimated standard error of a mean.
For example, in a one-way model:

where s2 is the estimate of σ2 and n is the number of responses in a sample mean. In models with random components, use:
where sedif is the estimated standard error of the difference of two means.
Keywords
ALPHA
Significance level of test. Must be in the interval [0.01, 0.10]. Default: Alpha = 0.01
DOUBLE
If present and nonzero, then double precision is used.
Discussion
The IMSL_MULTICOMP function performs a multiple-comparison analysis of means using the Student-Newman-Keuls method. The null hypothesis is equality of all possible ordered subsets of a set of means. This null hypothesis is tested using the Studentized range of each of the corresponding subsets of sample means. The method is discussed in many elementary statistics texts, e.g., Kirk (1982, pp. 123–125).
Example
A multiple-comparisons analysis is performed using data discussed by Kirk. The results show that there are three groups of means with three separate sets of values: (36.7, 40.3, 43.4), (40.3, 43.4, 47.2), and (43.4, 47.2, 48.7).
df = 45 std_error = 1.6970563 means = [36.7, 48.7, 43.4, 47.2, 40.3] equal_means = IMSL_MULTICOMP(means, df, std_error) PM, equal_means, Title = 'Size of groups of means:' Size of groups of means: 3 3 3 0
Version History