Order-restricted hypothesis testing in a generalized linear model: the effect of El Niño on the number of hurricanes.
The research question
restriktor also works for generalized linear models fitted with glm(), such as logistic regression for binary outcomes or Poisson regression for counts. Here we use the Hurricanes dataset: the number of hurricanes per year from 1950 to 1995, together with the El Niño phase of that year (1 = cold, 2 = neutral, 3 = warm). The data are taken from Silvapulle and Sen (2005).
A warm phase (El Niño) is known to suppress hurricane activity in the Atlantic, and a cold phase (La Niña) to enhance it. The expectation is therefore:
Since the log is an increasing function, the ordering of the log-means is the same as the ordering of the means. We can therefore impose the restrictions directly on the coefficients.
Restriktor: restricted hypothesis tests:
Constraint matrix:
ElNinoCold ElNinoNeutral ElNinoWarm op rhs active
1: 1 -1 0 >= 0 no
2: 0 1 -1 >= 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: 10.9408, p-value: 0.002314
Type A test: H0: all restrictions are equalities (==)
vs. HA: at least one inequality restriction is strictly true (>)
Test statistic: 10.9408, p-value: 0.002314
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 >= 10.9408]: p-value: 0.002314
Type C test: H0: at least one restriction is false or active (==)
vs. HA: all restrictions are strictly true (>)
Test statistic: 0.5993, p-value: 0.276
Note: Type C test is based on a t-distribution (one-sided),
all other tests are based on a mixture of F-distributions.
Step 4 – interpret the results
Type B is not rejected (\(\bar{F}\) = 0.00, p = 1.000): the data are in line with the expected ordering.
Type A is rejected (\(\bar{F}\) = 10.94, p = .002).
Conclusion: the data support the expectation that the number of hurricanes decreases from cold to neutral to warm El Niño phases.
Type C is not significant (\(t\) = 0.60, p = .276). The difference between the cold and neutral phases is small (6.80 versus 6.25 hurricanes per year), so we cannot conclude that both steps are strictly positive.
Model selection with the GORIC
goric() supports generalized linear models as well:
\(H_1\) is 2.63 times more supported than its complement. This is in line with the test result, and it also shows that the support is modest, because the cold and neutral phases hardly differ.
Overdispersion
A Poisson model assumes that the variance equals the mean. If the counts vary more than that (overdispersion), the standard errors are too small and the p-values too optimistic. A simple check is to compare the residual deviance with its degrees of freedom: