SNKMC
Performs Student-Newman-Keuls multiple comparison test.
Required Arguments
YMEANS — Vector of length NGROUP containing the means. (Input)
SEMEAN — Effective estimated standard error of a mean. (Input)
In fixed effects models, SEMEAN 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.
DFSE — Degrees of freedom associated with SEMEAN. (Input)
ALPHA — Significance level of test. (Input)
ALPHA must be in the interval [0.01, 0.10].
IEQMNS — Vector of length NGROUP ‑ 1 indicating the size of groups of means declared to be equal. (Output)
IEQMNS(I) = J indicates the I-th smallest mean and the next J ‑ 1 larger means are declared equal. IEQMNS(I) = 0 indicates no group of means starts with the I-th smallest mean.
Optional Arguments
NGROUP — Number of groups under consideration. (Input)
Default: NGROUP = size (YMEANS,1).
IPRINT — Printing option. (Input)
Default: IPRINT = 0.
IPRINT | Action |
---|
0 | No printing is performed. |
1 | Printing is performed. |
FORTRAN 90 Interface
Generic: CALL SNKMC (YMEANS, SEMEAN, DFSE, ALPHA, IEQMNS [, …])
Specific: The specific interface names are S_SNKMC and D_SNKMC.
FORTRAN 77 Interface
Single: CALL SNKMC (NGROUP, YMEANS, SEMEAN, DFSE, ALPHA, IPRINT, IEQMNS)
Double: The double precision name is DSNKMC.
Description
Routine SNKMC 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 for each of the corresponding subsets of sample means. The method is discussed in many elementary statistics texts, e.g., Kirk (1982, pages 123‑125).
Comments
Workspace may be explicitly provided, if desired, by use of S2KMC/DS2KMC. The reference is:
CALL S2KMC (NGROUP, YMEANS, SEMEAN, DFSE, ALPHA, IPRINT, IEQMNS, WK, IWK)
The additional arguments are as follows:
WK — Vector of length NGROUP containing YMEANS in ascending order. (Output)
IWK — Work vector of length 2 * NGROUP.
Example
A multiple comparisons analysis is performed using data discussed by Kirk (1982, pages 123‑125). In the output, means that are not connected by a common underline are declared different.
USE UMACH_INT
USE SNKMC_INT
IMPLICIT NONE
INTEGER IEQMNS(4), IPRINT, N, NOUT
REAL ALPHA, DFSE, S2, SEMEAN, SQRT, YMEANS(5)
INTRINSIC SQRT
!
DATA YMEANS/36.7, 48.7, 43.4, 47.2, 40.3/
!
CALL UMACH (2, NOUT)
S2 = 28.8
N = 10
SEMEAN = SQRT(S2/N)
DFSE = 45.0
ALPHA = .01
IPRINT = 1
CALL SNKMC (YMEANS, SEMEAN, DFSE, ALPHA, IEQMNS, IPRINT=IPRINT)
WRITE (NOUT,99999) IEQMNS
99999 FORMAT (' IEQMNS = ', 4I3)
END
Output
Group 1 5 3 4 2
Mean 36.70 40.30 43.40 47.20 48.70
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
IEQMNS = 3 3 3 0
Published date: 03/19/2020
Last modified date: 03/19/2020