Skip to main content

Evaluating a set of hypotheses

How to specify, compare and interpret theory-based hypotheses with goric(): safeguards, weights, post-hoc analysis and confidence intervals.

This page explains the main choices when you use goric(), and how to read its output. We use the AngerManagement data: the decrease in aggression for four groups (no training, physical exercise, behavioral therapy, or both). See also example 6 of the tutorial.

Step 1 – formulate your hypotheses before looking at the data

Each hypothesis is one theory, written in the constraint syntax. Here, two theories:

  • \(H_1\): physical exercise and behavioral therapy work equally well, and the combination works best;
  • \(H_2\): behavioral therapy works better than physical exercise, and the combination works best.
library(restriktor)

fit <- lm(Anger ~ -1 + Group, data = AngerManagement)

H1 <- ' GroupNo < GroupPhysical = GroupBehavioral < GroupBoth '
H2 <- ' GroupNo < GroupPhysical < GroupBehavioral < GroupBoth '

The hypotheses are given to goric() as a named list. The names (H1, H2) are used in the output.

Step 2 – choose a safeguard

The GORIC weights are relative: the best hypothesis in the set can still be a bad one. Therefore, goric() adds a safeguard hypothesis to the set. The argument comparison controls which one:

comparison = Added to the set Default when
"complement" the complement of your hypothesis: all parameter values not in \(H_1\) you specify one hypothesis
"unconstrained" the unconstrained hypothesis: no restrictions at all you specify more than one hypothesis
"none" nothing never (use with care)

The complement is the most powerful safeguard: \(H_1\) and its complement do not overlap, so the evidence for \(H_1\) can become very large. The unconstrained hypothesis always fits at least as well as any other hypothesis, but it is penalized for its complexity. A theory-based hypothesis that is not even better than “no theory at all” is a weak hypothesis.

Step 3 – run goric()

out <- goric(fit, hypotheses = list(H1 = H1, H2 = H2))
out
restriktor (0.7): generalized order-restricted information criterion: 

Results:

Values:
           model          loglik          penalty          goric
1             H1         -84.162            2.892        174.108
2             H2         -80.484            3.083        167.134
3  unconstrained         -80.484            5.000        170.968

Weights:
           model  loglik.weights  penalty.weights  goric.weights
1             H1           0.012            0.514          0.026
2             H2           0.494            0.424          0.849
3  unconstrained           0.494            0.062          0.125
   goric.weights_without_unc
1                      0.030
2                      0.970
3                           

Conclusion:
- The order-restricted hypothesis 'H2' is the best in the set, as it has
  the highest GORIC weight.
- Since 'H2' has a higher GORIC weight than the unconstrained hypothesis,
  it is not considered weak. We can now inspect the relative support for
  'H2' against the other order-restricted hypotheses:
  * 'H2' is 32.678 times more supported than 'H1'.

---

Additional information:

- It is advisable to compare the log-likelihood values (loglik) and/or
  weights (loglik.weights) of the best hypothesis with that of the other
  specified/informative hypotheses. More details can be found in the
  vignette 'Guidelines_GORIC_output' (to open it, run
  vignette("Guidelines_GORIC_output", package = "restriktor")) and in the
  decision tree on https://github.com/rebeccakuiper/Tutorials (the file
  'Decision tree - Interpretation.pdf').

- The benchmark() function can be used to label the height of the output,
  for example, the height of the ratio(s) of weights (e.g., to say whether
  that value denotes medium, high, or very large evidence). More details
  can be found in the vignette 'Guidelines_GORIC-benchmarks'; to open it,
  run vignette("Guidelines_GORIC-benchmarks", package = "restriktor").

- The results (including the conclusion) of the post-hoc analysis, in which
  the best hypothesis ('H2') is evaluated against its complement, are
  stored in the goric object. To see them, use:
  out$posthoc

Step 4 – read the output

For each hypothesis, the output shows:

  • loglik: the fit of the hypothesis (higher is better). The unconstrained hypothesis always has the highest loglik;
  • penalty: the complexity (lower is a more specific hypothesis). For the unconstrained model, the penalty equals the number of parameters (here 4 means + 1 variance);
  • goric = \(-2 \times\) loglik \(+ 2 \times\) penalty. Lower is better;
  • goric.weights: the relative support for each hypothesis in the set. They add up to 1.

The ratio of two weights tells you how much more support one hypothesis has than another. Here, \(H_2\) has 32.68 times more support than \(H_1\), and 6.80 times more support than the unconstrained hypothesis. So \(H_2\) is not weak, and it is the best hypothesis in the set.

TipWeights are not probabilities that a hypothesis is true

A GORIC weight of 0.85 does not mean that \(H_2\) is true with probability 0.85. It is the support relative to the other hypotheses in the set. Adding or removing a hypothesis changes all weights; the ratio between two weights does not change.

Also compare the log-likelihood weights. If the best hypothesis has about the same loglik as another hypothesis (here: \(H_2\) and the unconstrained hypothesis), its extra support comes only from the penalty. The guidelines article explains how to interpret such situations.

More detail: summary()

summary() gives all ratios of weights, also for the log-likelihood and penalty parts:

summary(out)
restriktor (0.7): generalized order-restricted information criterion: 

Results:
           model   loglik  penalty    goric  loglik.weights  penalty.weights
1             H1  -84.162    2.892  174.108           0.012            0.514
2             H2  -80.484    3.083  167.134           0.494            0.424
3  unconstrained  -80.484    5.000  170.968           0.494            0.062
   goric.weights  goric.weights_without_unc
1          0.026                      0.030
2          0.849                      0.970
3          0.125                           
---

Ratio GORIC-weights:
               vs. H1  vs. H2  vs. unconstrained
H1              1.000   0.031              0.208
H2 (best)      32.678   1.000              6.798
unconstrained   4.807   0.147              1.000
---

Ratio loglik-weights:
               vs. H1  vs. H2  vs. unconstrained
H1              1.000   0.025              0.025
H2 (best)      39.576   1.000              1.000
unconstrained  39.576   1.000              1.000
---

Ratio penalty-weights:
               vs. H1  vs. H2  vs. unconstrained
H1              1.000   1.211              8.233
H2 (best)       0.826   1.000              6.798
unconstrained   0.121   0.147              1.000
---

order-restricted hypotheses:

H1:
GroupNo < GroupPhysical = GroupBehavioral < GroupBoth 

H2:
GroupNo < GroupPhysical < GroupBehavioral < GroupBoth 


---

Additional information:

- The results (including the conclusion) of the post-hoc analysis, in which
  the best hypothesis ('H2') is evaluated against its complement, are
  stored in the goric object. To see them, use:
  out$posthoc

Post-hoc: the best hypothesis versus its complement

When you specify several hypotheses, goric() also evaluates the best one against its complement. This shows how much evidence there is for the best hypothesis compared with everything else:

out$posthoc
restriktor (0.7): post-hoc analysis (information for future research), in
which the best hypothesis is evaluated against its complement:

Results:

Values:
        model          loglik          penalty          goric
1          H2         -80.484            3.083        167.134
2  complement         -81.233            4.875        172.216

Weights:
        model  loglik.weights  penalty.weights  goric.weights
1          H2           0.679            0.857          0.927
2  complement           0.321            0.143          0.073

Conclusion:
The best hypothesis in the set, 'H2', has 12.69 times more support than its
complement.
The conditional error probability, that is, the probability (given the
data) that choosing 'H2' (over its complement) is incorrect, is 0.073.

Note:
The hypothesis is selected based on the data; hence, this is a post-hoc
(exploratory) result, which can be used to inform future research, but not
as a confirmatory evaluation.

The conditional error probability is the probability, given the data, that choosing the best hypothesis over its complement is wrong. Since the best hypothesis was selected after seeing the data, this is exploratory information for future research, not a confirmatory result.

Uncertainty: goric_CI()

The GORIC values and weights are estimates and depend on the sample. goric_CI() gives confidence intervals:

set.seed(2026)
goric_CI(out)
restriktor: 95% confidence intervals for GORIC values, differences,
weights, and ratios of weights
(inversion CIs for the hypotheses versus the unconstrained hypothesis /
their complement; other pairs (and the weights, if more than two
hypotheses): parametric-bootstrap percentile CIs, B = 1000; see the
CI_method columns)

GORIC values:
         model   goric    SE   lower   upper
            H1 174.108 8.070 158.291 189.925
            H2 167.134 7.933 151.586 182.682
 unconstrained 170.968 7.933 155.420 186.516

Differences in GORIC values (best hypothesis H2 versus the others):
 model            vs difference    SE   lower  upper same_loglik CI_method
    H2            H1     -6.973 5.264 -21.844 -0.693       FALSE      boot
    H2 unconstrained     -3.833 0.000  -3.833 -2.926        TRUE      boot

GORIC weights:
         model goric.weights    lower upper CI_method
            H1         0.026 1.56e-05 0.381      boot
            H2         0.849    0.539 0.872      boot
 unconstrained         0.125    0.079 0.188      boot

Ratios of GORIC weights (best hypothesis H2 versus the others):
 model            vs  ratio lower    upper same_loglik CI_method
    H2            H1 32.678 1.414 5.54e+04       FALSE      boot
    H2 unconstrained  6.798 4.319    6.798        TRUE      boot

The intervals for the ratios can be wide, especially with small samples (here 10 persons per group). Report them together with the point estimates.

Small samples: GORICC

With small samples relative to the number of parameters, use the small-sample correction with type = "goricc" (or "goricac" for the GORICA):

goric(fit, hypotheses = list(H1 = H1, H2 = H2), type = "goricc")
restriktor (0.7): small sample generalized order-restricted information criterion:

Results:

Values:
           model          loglik          penalty          goricc
1             H1         -84.162            3.220         174.764
2             H2         -80.484            3.456         167.880
3  unconstrained         -80.484            5.882         172.733

Weights:
           model  loglik.weights  penalty.weights  goricc.weights
1             H1           0.012            0.538           0.029
2             H2           0.494            0.425           0.893
3  unconstrained           0.494            0.038           0.079
   goricc.weights_without_unc
1                       0.031
2                       0.969
3                            

Conclusion:
- The order-restricted hypothesis 'H2' is the best in the set, as it has
  the highest GORICC weight.
- Since 'H2' has a higher GORICC weight than the unconstrained hypothesis,
  it is not considered weak. We can now inspect the relative support for
  'H2' against the other order-restricted hypotheses:
  * 'H2' is 31.240 times more supported than 'H1'.

---

Additional information:

- It is advisable to compare the log-likelihood values (loglik) and/or
  weights (loglik.weights) of the best hypothesis with that of the other
  specified/informative hypotheses. More details can be found in the
  vignette 'Guidelines_GORIC_output' (to open it, run
  vignette("Guidelines_GORIC_output", package = "restriktor")) and in the
  decision tree on https://github.com/rebeccakuiper/Tutorials (the file
  'Decision tree - Interpretation.pdf').

- The benchmark() function can be used to label the height of the output,
  for example, the height of the ratio(s) of weights (e.g., to say whether
  that value denotes medium, high, or very large evidence). More details
  can be found in the vignette 'Guidelines_GORIC-benchmarks'; to open it,
  run vignette("Guidelines_GORIC-benchmarks", package = "restriktor").

- The results (including the conclusion) of the post-hoc analysis, in which
  the best hypothesis ('H2') is evaluated against its complement, are
  stored in the goric object. To see them, first save the output of goric()
  as an object, and then use:
  <name goric object>$posthoc

Interpreting the height of the support: benchmarks

Is a ratio of 7 a lot? That depends on the sample size and the hypotheses. The benchmark() function compares your results with the results you would expect under a population with no effects and under a population like the one you observed. See the article Guidelines for GORIC(A) benchmarks.