SCIPM

Computes simultaneous confidence intervals on all pairwise differences of means.

Required Arguments

NI — Vector of length NGROUP containing the number of observations in each mean. (Input)

YMEANS — Vector of length NGROUP containing the means. (Input)

DFS2 — Degrees of freedom for s2. (Input)

S2s2, the estimated variance of an observation. (Input)
The variance of YMEANS(I) is estimated by S2/NI(I).

STATNGROUP * (NGROUP 1)/2 by 5 matrix containing the statistics relating to the difference of means. (Output)

 

Col.

Description

1

Group number for the i-th mean

2

Group number for the j-th mean

3

Difference of means (i-th mean)  (j-th mean)

4

Lower confidence limit for the difference

5

Upper confidence limit for the difference

Optional Arguments

NGROUP — Number of means. (Input)
Default: NGROUP = size(NI,1).

IMETH — Method used for constructing confidence intervals on all pairwise differences of means. (Input)
Default: IMETH = 0.

 

IMETH

Method

0

Tukey (if equal group sizes), Tukey-Kramer method (otherwise)

1

Dunn-Sidak method

2

Bonferroni method

3

Scheffe method

4

One-at-a-time t methodLSD test

CONPER — Confidence percentage for the simultaneous interval estimation. (Input)
Default: CONPER = 95.0.

 

IMETH

CONPER

0

Percentage must be greater than or equal to 0.0 and less than 100.0.

1

Percentage must be greater than or equal to 90.0 and less than or equal to 99.0.

IPRINT — Printing option. (Input)
Default: IPRINT = 0.

 

IPRINT

Action

0

No printing is performed.

1

Printing is performed.

LDSTAT — Leading dimension of STAT exactly as specified in the dimension statement in the calling program. (Input)
Default: LDSTAT = size (STAT,1).

FORTRAN 90 Interface

Generic: CALL SCIPM (NI, YMEANS, DFS2, S2, STAT [])

Specific: The specific interface names are S_SCIPM and D_SCIPM.

FORTRAN 77 Interface

Single: CALL SCIPM (NGROUP, NI, YMEANS, DFS2, S2, IMETH, CONPER, IPRINT, STAT, LDSTAT)

Double: The double precision name is DSCIPM.

Description

Routine SCIPM computes simultaneous confidence intervals on all k* = k(k  1)/2 pairwise comparisons of k means μ1, μ2, , μk in the one-way analysis of variance model. Any of several methods can be chosen. A good review of these methods is given by Stoline (1981). Also the methods are discussed in many elementary statistics texts, e.g., Kirk (1982, pages 114127).

Let s2 (input in S2) be the estimated variance of a single observation. Let ν be the degrees of freedom (input in DFS2) associated with s2: Let α =1  CONPER/100.0. The methods are summarized as follows:

Tukey method: The Tukey method gives the narrowest simultaneous confidence intervals for all pairwise differences of means μi μj in balanced (n1 = n2 =  = nk = n) one-way designs. The method is exact and uses the Studentized range distribution. The formula for the difference μi μj is given by

 

where q1-α;k,ν is the (1  α)100 percentage point of the Studentized range distribution with parameters k and ν.

Tukey-Kramer method: The Tukey-Kramer method is an approximate extension of the Tukey method for the unbalanced case. (The method simplifies to the Tukey method for the balanced case.) The method always produces confidence intervals narrower than the Dunn-Sidak and Bonferroni methods. Hayter (1984) proved that the method is conservative, i.e., the method guarantees a confidence coverage of at least (1  α)100%. Hayter’s proof gave further support to earlier recommendations for its use (Stoline 1981). (Methods that are currently better are restricted to special cases and only offer improvement in severely unbalanced cases, see, e.g., Spurrier and Isham 1985). The formula for the difference μi  μj is given by

 

Dunn-Šidák method: The Dunn-Šidák method is a conservative method. The method gives wider intervals than the Tukey-Kramer method. (For large ν and small α and k, the difference is only slight.) The method is slightly better than the Bonferroni method and is based on an improved Bonferroni (multiplicative) inequality (Miller, pages 101, 254255). The method uses the t distribution (see IMSL routine TIN, in Chapter 17, “Probability Distribution Function and Inverses”). The formula for the difference μi  μj is given by

 

where tf;ν is the 100f percentage point of the t distribution with ν degrees of freedom.

Bonferroni method: The Bonferroni method is a conservative method based on the Bonferroni (additive) inequality (Miller, page 8). The method uses the t distribution. The formula for the difference μi  μj is given by

 

Scheffé method: The Scheffé method is an overly conservative method for simultaneous confidence intervals on pairwise difference of means. The method is applicable for simultaneous confidence intervals on all contrasts, i.e., all linear combinations

 

The method can be recommended here only if a large number of confidence intervals on contrasts in addition to the pairwise differences of means are to be constructed. The method uses the F distribution (see IMSL routine FIN, in Chapter 17, “Probability Distribution Function and Inverses”. The formula for the difference μi μj is given by

 

where F1-α;k-1,ν is the (1 α)100 percentage point of the F distribution with k 1 and ν degrees of freedom.

One-at-a-time t method (Fisher’s LSD): The one-at-a-time t method is the method appropriate for constructing a single confidence interval. The confidence percentage input is appropriate for one interval at a time. The method has been used widely in conjunction with the overall test of the null hypothesis μ1 = μ2 =  = μk by the use of the F statistic. Fisher’s LSD (least significant difference) test is a two-stage test that proceeds to make pairwise comparisons of means only if the overall F test is significant.

Milliken and Johnson (1984, page 31) recommend LSD comparisons after a significant F only if the number of comparisons is small and the comparisons were planned prior to the analysis. If many unplanned comparisons are made, they recommend Scheffe’s method. If the F test is insignificant, a few planned comparisons for differences in means can still be performed by using either Tukey, Tukey-Kramer, Dunn-Šidák or Bonferroni methods. Because the F test is insignificant, Scheffe’s method will not yield any significant differences. The formula for the difference μi μj is given by

 

Comments

Workspace may be explicitly provided, if desired, by use of S2IPM/DS2IPM. The reference is:

CALL S2IPM (NGROUP, NI, YMEANS, DFS2, S2, IMETH, CONPER, IPRINT, STAT, LDSTAT, WK, IWK)

The additional arguments are as follows:

WK — Real work vector of length NGROUP.

IWK — Integer work vector of length NGROUP.

Example

Simultaneous 99% confidence intervals are computed for all pairwise comparisons of 5 means from a one-way analysis of variance design. In order to compare the results of each method, all the options for IMETH are used for input. The data are given by Kirk (1982, Table 3.5-1, page 117). In the output, pairs of means declared not equal are indicated by the letter N. The other pairs of means (for which there is insufficient evidence from the data to declare the means are unequal) are indicated by an equal sign (=).

 

USE SCIPM_INT

 

IMPLICIT NONE

INTEGER LDSTAT, NGROUP

PARAMETER (NGROUP=5, LDSTAT=NGROUP*(NGROUP-1)/2)

!

INTEGER IMETH, IPRINT, NI(NGROUP)

REAL CONPER, DFS2, S2, STAT(LDSTAT,5), YMEANS(NGROUP)

!

DATA YMEANS/36.7, 48.7, 43.4, 47.2, 40.3/

DATA NI/10, 10, 10, 10, 10/

!

DFS2 = 45.0

S2 = 28.8

CONPER = 99.0

IPRINT = 1

DO 10 IMETH=0, 4

CALL SCIPM (NI, YMEANS, DFS2, S2, STAT, IMETH=IMETH, &

CONPER=CONPER, IPRINT=IPRINT)

10 CONTINUE

END

Output

 

Simultaneous Confidence Intervals

for All Pairwise Differences of Means

(Tukey Method)

 

99.0% Confidence Interval

--------------------------

 

Group I Group J Mean I - Mean J Lower Limit Upper Limit

N 1 2 -12.0 -20.261 -3.739

= 1 3 -6.7 -14.961 1.561

N 1 4 -10.5 -18.761 -2.239

= 1 5 -3.6 -11.861 4.661

= 2 3 5.3 -2.961 13.561

= 2 4 1.5 -6.761 9.761

N 2 5 8.4 0.139 16.661

= 3 4 -3.8 -12.061 4.461

= 3 5 3.1 -5.161 11.361

= 4 5 6.9 -1.361 15.161

Simultaneous Confidence Intervals

for All Pairwise Differences of Means

(Dunn-Sidak Method)

 

99.0% Confidence Interval

--------------------------

Group I Group J Mean I - Mean J Lower Limit Upper Limit

N 1 2 -12.0 -20.445 -3.555

= 1 3 -6.7 -15.145 1.745

N 1 4 -10.5 -18.945 -2.055

= 1 5 -3.6 -12.045 4.845

= 2 3 5.3 -3.145 13.745

= 2 4 1.5 -6.945 9.945

= 2 5 8.4 -0.045 16.845

= 3 4 -3.8 -12.245 4.645

= 3 5 3.1 -5.345 11.545

= 4 5 6.9 -1.545 15.345

 

Simultaneous Confidence Intervals

for All Pairwise Differences of Means

(Bonferroni Method)

 

99.0% Confidence Interval

--------------------------

Group I Group J Mean I - Mean J Lower Limit Upper Limit

N 1 2 -12.0 -20.449 -3.551

= 1 3 -6.7 -15.149 1.749

N 1 4 -10.5 -18.949 -2.051

= 1 5 -3.6 -12.049 4.849

= 2 3 5.3 -3.149 13.749

= 2 4 1.5 -6.949 9.949

= 2 5 8.4 -0.049 16.849

= 3 4 -3.8 -12.249 4.649

= 3 5 3.1 -5.349 11.549

= 4 5 6.9 -1.549 15.349

 

Simultaneous Confidence Intervals

for All Pairwise Differences of Means

(Scheffe Method)

 

99.0% Confidence Interval

--------------------------

Group I Group J Mean I - Mean J Lower Limit Upper Limit

N 1 2 -12.0 -21.317 -2.683

= 1 3 -6.7 -16.017 2.617

N 1 4 -10.5 -19.817 -1.183

= 1 5 -3.6 -12.917 5.717

= 2 3 5.3 -4.017 14.617

= 2 4 1.5 -7.817 10.817

= 2 5 8.4 -0.917 17.717

= 3 4 -3.8 -13.117 5.517

= 3 5 3.1 -6.217 12.417

= 4 5 6.9 -2.417 16.217

Simultaneous Confidence Intervals

for All Pairwise Differences of Means

(One-at-a-Time t Method--LSD Test)

 

99.0% Confidence Interval

--------------------------

Group I Group J Mean I - Mean J Lower Limit Upper Limit

N 1 2 -12.0 -18.455 -5.545

N 1 3 -6.7 -13.155 -0.245

N 1 4 -10.5 -16.955 -4.045

= 1 5 -3.6 -10.055 2.855

= 2 3 5.3 -1.155 11.755

= 2 4 1.5 -4.955 7.955

N 2 5 8.4 1.945 14.855

= 3 4 -3.8 -10.255 2.655

= 3 5 3.1 -3.355 9.555

N 4 5 6.9 0.445 13.355