library(restriktor)
aggregate(Age ~ Group, data = ZelazoKolb1972, FUN = mean) Group Age
1 Active 10.12500
2 Control 11.70833
3 No 12.35000
4 Passive 11.37500
The ZelazoKolb1972 dataset (built into restriktor) contains the age in months at which 24 children started to walk. The children were in one of four groups:
The claim is that walking exercises reduce the mean age at which children start to walk. More exercise means walking at a younger age:
\[ H_1: \mu_{Active} \leq \mu_{Passive} \leq \mu_{Control} \leq \mu_{No}. \]

A classical ANOVA would test whether any of the means differ, followed by post-hoc tests. Testing \(H_1\) directly answers the actual research question, with more power and without multiple testing.
Group Age
1 Active 10.12500
2 Control 11.70833
3 No 12.35000
4 Passive 11.37500
The sample means are in the expected order. The question is whether the evidence is strong enough.
An ANOVA is a linear model. We remove the intercept (-1), so that each coefficient is a group mean:
We use the coefficient names from step 2 (see the constraint syntax):
Restriktor: restricted hypothesis tests:
Multiple R-squared remains 0.986
Constraint matrix:
GroupActive GroupControl GroupNo GroupPassive op rhs active
1: -1 0 0 1 >= 0 no
2: 0 1 0 -1 >= 0 no
3: 0 -1 1 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: 6.4267, p-value: 0.03086
Type A test: H0: all restrictions are equalities (==)
vs. HA: at least one inequality restriction is strictly true (>)
Test statistic: 6.4267, p-value: 0.03086
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 >= 6.4267]: p-value: 0.03086
Type C test: H0: at least one restriction is false or active (==)
vs. HA: all restrictions are strictly true (>)
Test statistic: 0.3807, p-value: 0.3538
Note: Type C test is based on a t-distribution (one-sided),
all other tests are based on a mixture of F-distributions.
We follow the two-step approach:
Conclusion: the data support the hypothesis that walking exercises are associated with a lower age at which children start to walk.
Note that Type C is not significant (\(t\) = 0.38, p = .354). So we cannot claim that every difference between adjacent groups is strictly positive. With only six children per group, that would require much stronger evidence.
Call:
conLM.lm(object = object, constraints = constraints)
Restriktor: restricted linear model:
Residuals:
Min 1Q Median 3Q Max
-2.7083 -0.8500 -0.3500 0.6375 3.6250
Coefficients:
Estimate Std. Error t value Pr(>|t|)
GroupActive 10.12500 0.61907 16.355 1.191e-12 ***
GroupControl 11.70833 0.61907 18.913 8.774e-14 ***
GroupNo 12.35000 0.67815 18.211 1.736e-13 ***
GroupPassive 11.37500 0.61907 18.375 1.478e-13 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.5164 on 19 degrees of freedom
Standard errors: standard
Multiple R-squared remains 0.986
Generalized order-restricted information criterion:
Loglik Penalty goric
-40.0142 3.0978 86.2240
With model selection, we do not test against a null hypothesis. Instead, we compare \(H_1\) with its complement: all orderings of the four means that are not in line with \(H_1\).
restriktor (0.7): generalized order-restricted information criterion:
Results:
model loglik penalty goric loglik.weights penalty.weights
1 H1 -40.014 3.098 86.224 0.522 0.855
2 complement -40.102 4.869 89.940 0.478 0.145
goric.weights
1 0.865
2 0.135
---
The order-restricted hypothesis 'H1' has 6.41 times more support than its
complement.
Ratio GORIC-weights:
vs. H1 vs. complement
H1 (best) 1.000 6.412
complement 0.156 1.000
---
Ratio loglik-weights:
vs. H1 vs. complement
H1 (best) 1.000 1.091
complement 0.916 1.000
---
Ratio penalty-weights:
vs. H1 vs. complement
H1 (best) 1.00 5.88
complement 0.17 1.00
---
order-restricted hypotheses:
H1:
GroupActive < GroupPassive < GroupControl < GroupNo
\(H_1\) has a GORIC weight of 0.87, so it is 6.41 times more supported than its complement. The log-likelihoods of both hypotheses are close, because some sample means are close to each other (for example, Passive and Control). Most of the difference comes from the penalty, which is smaller for \(H_1\) because it is the more specific hypothesis.
Both approaches lead to the same conclusion: the data support \(H_1\). The GORIC adds how much support there is, relative to the alternative.