AngerManagement$Age_c <- AngerManagement$Age - mean(AngerManagement$Age)Ex. 2 – Ordered adjusted means (ANCOVA)
The research question
The AngerManagement dataset contains the decrease in aggression level between week 1 (intake) and week 8 (end of training) for 40 persons in four groups:
- No: no training;
- Physical: physical exercises;
- Behavioral: behavioral therapy;
- Both: physical exercises and behavioral therapy combined.
The researchers expected the smallest decrease without training, an equal decrease for physical exercise and behavioral therapy, and the largest decrease for the combination, after correcting for age:
\[ H_1: \mu^{adj}_{No} \leq \mu^{adj}_{Physical} = \mu^{adj}_{Behavioral} \leq \mu^{adj}_{Both}, \]
where \(\mu^{adj}\) denotes an age-adjusted mean.

Step 1 – center the covariate
If we center age at its mean, the group coefficients are the adjusted means, that is, the expected decrease for a person of average age:
Step 2 – fit the unrestricted ANCOVA model
fit.ANCOVA <- lm(Anger ~ -1 + Group + Age_c, data = AngerManagement)
coef(fit.ANCOVA)GroupBehavioral GroupBoth GroupNo GroupPhysical Age_c
3.3083835 4.3627444 -0.4446241 0.5734962 -0.1812030
Step 3 – write the constraint syntax
There is no restriction on the covariate; it is simply part of the model.
H1 <- ' GroupNo < GroupPhysical == GroupBehavioral < GroupBoth 'Step 4 – test the informative hypothesis
out1 <- iht(fit.ANCOVA, constraints = H1)
out1
Restriktor: restricted hypothesis tests:
Multiple R-squared reduced from 0.685 to 0.609
Constraint matrix:
GroupBehavioral GroupBoth GroupNo GroupPhysical Age_c op rhs active
1: -1 0 0 1 0 == 0 yes
2: 0 0 -1 1 0 >= 0 no
3: -1 1 0 0 0 >= 0 no
Overview of all available hypothesis tests:
Global test: H0: all parameters are restricted to be equal (==)
vs. HA: at least one inequality restriction is strictly true (>)
Test statistic: 44.5941, p-value: <0.0001
Type A test: H0: all restrictions are equalities (==)
vs. HA: at least one inequality restriction is strictly true (>)
Test statistic: 19.9963, p-value: 0.0001172
Type B test: H0: all restrictions hold in the population
vs. HA: at least one restriction is violated
Test statistic: 8.4966, p-value: 0.02751
Joint Type A and Type B test (Wolak, 1989, Theorem 1):
joint tail probability under H0: Rb = r (least favorable null)
Pr[Type B >= 8.4966, Type A >= 19.9963]: p-value: <0.0001
Note: All tests are based on a mixture of F-distributions
(Type C test is not applicable because of equality restrictions.)
Step 5 – interpret the results
- Type B is rejected (\(\bar{F}\) = 8.50, p = .028). The data are not in line with \(H_1\).
- Type A is also rejected (\(\bar{F}\) = 20.00, p < .001), but because Type B is rejected, this does not support \(H_1\).
Conclusion: \(H_1\) is not supported. This example shows why you should never look at Type A alone. Type A only says that the adjusted means are not all equal. It does not say that they are ordered as hypothesized.
Model selection with the GORIC
The same conclusion follows from comparing \(H_1\) with its complement:
out.goric <- goric(fit.ANCOVA, hypotheses = list(H1 = H1),
comparison = "complement")
out.goric$result model loglik penalty goric loglik.weights penalty.weights
1 H1 -84.15249 3.924816 176.1546 0.01278424 0.8389408
2 complement -79.80582 5.575184 170.7620 0.98721576 0.1610592
goric.weights
1 0.06319158
2 0.93680842
The complement is 14.82 times more supported than \(H_1\). The restricted log-likelihood of \(H_1\) (-84.15) is clearly lower than that of the complement (-79.81): the data are not in line with the equality restriction.
A closer look
The adjusted means show what went wrong: behavioral therapy (3.31) gives a much larger decrease than physical exercise (0.57). The equality restriction in \(H_1\) does not hold.
Suppose that, based on theory, a strict ordering was a plausible competing expectation. Then we can test it as well:
H2 <- ' GroupNo < GroupPhysical < GroupBehavioral < GroupBoth '
out2 <- iht(fit.ANCOVA, constraints = H2)
out2
Restriktor: restricted hypothesis tests:
Multiple R-squared remains 0.685
Constraint matrix:
GroupBehavioral GroupBoth GroupNo GroupPhysical Age_c op rhs active
1: 0 0 -1 1 0 >= 0 no
2: 1 0 0 -1 0 >= 0 no
3: -1 1 0 0 0 >= 0 no
Overview of all available hypothesis tests:
Global test: H0: all parameters are restricted to be equal (==)
vs. HA: at least one inequality restriction is strictly true (>)
Test statistic: 53.0907, p-value: <0.0001
Type A test: H0: all restrictions are equalities (==)
vs. HA: at least one inequality restriction is strictly true (>)
Test statistic: 28.4928, p-value: <0.0001
Type B test: H0: all restrictions hold in the population
vs. HA: at least one restriction is violated
Test statistic: 0.0000, p-value: 1
Joint Type A and Type B test (Wolak, 1989, Theorem 1):
joint tail probability under H0: Rb = r (least favorable null)
Pr[Type B >= 0.0000, Type A >= 28.4928]: p-value: <0.0001
Type C test: H0: at least one restriction is false or active (==)
vs. HA: all restrictions are strictly true (>)
Test statistic: 1.1966, p-value: 0.1197
Note: Type C test is based on a t-distribution (one-sided),
all other tests are based on a mixture of F-distributions.
Now Type B is not rejected (\(\bar{F}\) = 0.00, p = 1.000) and Type A is rejected (\(\bar{F}\) = 28.49, p < .001): the data support \(H_2\).