### Example 59.10 Isotonic Contrasts for Ordered Mean Values

It is often of interest to test whether the mean values of the dependent variable increases or decreases monotonically with certain factors. Hirotsu and Srivastava (2000) demonstrate one approach by using data (Moriguchi, 1976). The data consist of ferrite cores subjected to four increasing temperatures. The response variable is the magnetic force of each core.

```data FerriteCores;
do Temp = 1 to 4;
do rep = 1 to 5; drop rep;
input MagneticForce @@;
output;
end;
end;
datalines;
10.8  9.9 10.7 10.4  9.7
10.7 10.6 11.0 10.8 10.9
11.9 11.2 11.0 11.1 11.3
11.4 10.7 10.9 11.3 11.7
;
```

The method presented by Hirotsu and Srivastava (2000) to test whether the magnetic force of the cores rises monotonically with temperature depends on the lower confidence limits of the isotonic contrasts of the force means at each temperature, adjusted for multiplicity. The corresponding isotonic contrast compares the average of a particular group and the preceding groups with the average of the succeeding groups. You can compute adjusted confidence intervals for isotonic contrasts by using the LSMESTIMATE statement.

The following statements analyze the `FerriteCores` data as a one-way design and multiplicity-adjusted lower confidence limits for the isotonic contrasts. For the multiplicity adjustment, the LSMESTIMATE statement employs simulation, which provides adjusted p-values and lower confidence limits that are exact up to Monte Carlo error.

```proc mixed data=FerriteCores;
class Temp;
model MagneticForce = Temp;
lsmestimate Temp
'avg(1:1)<avg(2:4)' -3  1  1  1 divisor=3,
'avg(1:2)<avg(3:4)' -1 -1  1  1 divisor=2,
'avg(1:3)<avg(4:4)' -1 -1 -1  3 divisor=3
ods select LSMestimates;
run;
```

The results are shown in Output 59.10.1.

Output 59.10.1: Analysis of LS-Means with Isotonic Contrasts

The Mixed Procedure

Least Squares Means Estimates