The Quasi-Poisson regression retains the same conditional mean but permits
This is a mean–variance function specification through quasi-likelihood; it does not assign a full probability distribution to each count. For independent observations, the quasi-score equation is proportional to , so the mean statistical parameter estimates equal those from Poisson regression. The output estimates through the Pearson dispersion estimator, and inflates the standard errors by approximately .
The large residual deviance relative to 728 residual statistical degrees of freedom also signals substantial overdispersion. Daily weather, traffic and other omitted conditions may produce greater count variation than a homogeneous Poisson distribution allows. The Quasi-Poisson regression accounts for that extra marginal variance. It still requires a correct conditional mean and an appropriate independence assumption; a common dispersion parameter alone does not repair serial correlation.
For the gamma variance function, the Pearson dispersion estimator is
using residual degrees of freedom. Under a specified null dispersion , the scaled statistic based on squared Pearson residuals has an approximate distribution under the usual residual approximation.
Thus test1 corresponds to , equivalently gamma shape , the exponential distribution. test2 corresponds to , equivalently shape . The null hypotheses concern dispersion or shape, not whether the regression coefficients vanish.
The code computes lower-tail probabilities. Used as one-sided tests, the alternatives are and , respectively, equivalently shapes larger than one and three. At the 5% level the first null is rejected because the lower-tail probability is , while the second is not rejected because its probability is . If the intended alternatives are two-sided, , these displayed numbers must not be called two-sided p-values: doubling the smaller tail gives approximately and , with the same decisions. The chi-squared distribution approximation is not an exact finite-sample gamma identity.
The residual deviance is on residual degrees of freedom. Under a suitable Poisson deviance goodness-of-fit test approximation it is compared with , whose supplied 95th percentile is . Since is much larger, the chosen Poisson model does not provide a satisfactory absolute fit, despite being preferred among the three candidates.
The ratio suggests substantial overdispersion or mean-model misspecification. It is a deviance ratio, not the exact Pearson dispersion estimator, which cannot be computed from the excerpt. Check residual patterns, nonlinear effects, unusual rivers and dependence. A Quasi-Poisson regression could adjust uncertainty under an estimated dispersion, and a negative binomial regression could model extra count variation; a more adequate mean model may also be needed. The nominal Poisson tests in part (a) should be interpreted in light of this failure, rather than treated as a validated final analysis.
The Pearson dispersion estimator is , well above the Poisson value one. A Quasi-Poisson regression retains the logarithmic mean model but uses
This is a quasi-likelihood specification; it does not by itself identify a count probability distribution. For a common , the quasi-score equation is the Poisson score divided by , so its roots and fitted means are unchanged. Thus
Coefficient standard errors are multiplied by . The altitude standard error becomes , giving the requested approximate normal confidence interval
It excludes zero, so retain altitude on this approximate 5% test. Its test statistic is about after allowing for overdispersion, rather than the Poisson value . Rescaling uncertainty cannot repair a systematically misspecified mean; the diagnostics in part (e) motivate reconsidering that mean as well.
The residual smooth rises from negative values, arches above zero, then falls at high fitted values. This suggests a nonlinear altitude effect on the log mean. Since the fitted log mean in the linear model increases with altitude, the horizontal fitted-value axis is also an increasing rescaling of altitude. A generalized additive model with Quasi-Poisson regression is therefore a reasonable candidate:
The centering constraint identifies the intercept. Here bs="cr" uses a penalized cubic regression spline. The plotted count residuals are deviance residuals, with the Q-Q panel using leverage-standardized versions. The quantile-quantile plot also shows tail discrepancies, but normality of count residuals is not a distributional assumption of this model: its main requirements are an adequate mean, variance relation, and independence. Investigate the labelled islands and possible excess variation as well.
The estimated smooth in the second plot increases fairly rapidly at low altitude, flattens around altitude 20 to 25, and is nearly level at the upper end. The pointwise bands widen where there are fewer observations. A penalized spline can describe a rise followed by a plateau without forcing a global parabola. A quadratic log mean has slope , so negative curvature eventually forces a decline and its curvature is constant everywhere. A cubic regression spline allows different curvature over different ranges, with a penalty controlling unnecessary wiggles and natural linear tails outside its boundary knots. The displayed smooth supports this greater flexibility, but it is not by itself a formal rejection of every quadratic model. Select complexity and compare predictive performance using cross-validation, then reassess residuals and the Pearson dispersion estimator.
The quasibinomial regression retains the logit link and mean function but uses the working variance function . Its quasi-score equation is
so multiplying by the common dispersion parameter does not change the coefficient estimates. Iteratively reweighted least squares therefore gives the same fitted means and coefficients as the binomial model. The usual Pearson dispersion estimator is
The estimated coefficient covariance matrix is , with . From the intercept standard errors, ; the rounded slope errors give approximately the same factor. The display uses approximate Student's t-tests with 118 residual degrees of freedom instead of fixed-dispersion normal tests.
For a genuinely individual binary response, the Bernoulli distribution identity forces . Thus is a working quasi-likelihood specification, not a different independent binary distribution with that mean. The mild estimated underdispersion does not establish an improved model, and the mean predictions are unchanged. In particular, a scalar rescaling does not model correlation among users, and usual likelihood-based Akaike information criterion comparisons are unavailable for a family without a specified probability likelihood. The output gives no convincing reason to prefer model3 to model2.
Under a correctly specified Poisson regression with adequate expected counts, the residual Poisson deviance is approximately chi-squared distribution with residual degrees of freedom. The observed gives
Thus the ordinary Poisson model gives a very poor fit under this goodness-of-fit approximation. This is consistent with overdispersion, although a wrong mean model or dependence can also cause lack of fit; quasi-Poisson variance inflation alone does not establish that the mean model is adequate.
For Quasi-Poisson regression, . The Pearson dispersion estimator is
It uses squared Pearson residuals, not the residual deviance divided by 102. The fitted coefficients are unchanged, and their estimated covariance matrix is multiplied by . With , standard errors increase by , so the main treatment coefficient has
The main Progabide coefficient is not significant at 5% after this dispersion adjustment. R uses a Student's t-distribution when dispersion is estimated, as described in its GLM summary documentation; the large-sample normal approximation also gives the same decision.
Because an interaction term is present, this tests the treatment contrast at baseline zero. An overall absence of treatment influence requires the joint null . The printed marginal standard errors do not give their covariance, so they are insufficient to calculate that joint Wald test, or the treatment contrast test at an arbitrary nonzero baseline.
A standard moment estimator is the Pearson dispersion estimator
For Bernoulli data, . The deviance divided by its residual degrees of freedom is a common alternative.
The researcher computed the Pearson chi-squared statistic
and compared it with a distribution, using residual degrees of freedom. Under an adequate large-sample Poisson regression, should be roughly the residual degrees of freedom. The reported tail probability rounds numerically to zero and gives strong evidence of overdispersion.
Possible causes include unobserved heterogeneity or omitted covariates, dependence among respondents, excess zeros, or an incorrect mean function. The conclusion that the Poisson variance assumption fails is well supported, although this test alone does not identify the cause or establish that the Quasi-Poisson regression variance is correct.
The reported Pearson dispersion estimator is , so
up to rounding.
For the Poisson variance function , the code computes the Pearson chi-squared statistic
and the Pearson dispersion estimator
The first quantity measures goodness of fit; the second estimates the dispersion parameter, which equals one in a correctly specified Poisson regression. A standard rough calculation substitutes the residual deviance for the Pearson statistic and gives
If the reported upper-tail probability is inverted numerically, the actual Pearson statistic used by the code is about , giving . Either calculation reveals severe overdispersion.