Tutorials › Generalized Linear Models › Predictions From an Inverse-Gaussian GLM

Inverse-Gaussian Models · Tutorial 604 of 981

Predictions From an Inverse-Gaussian GLM

Convert a fitted inverse-Gaussian GLM into a conditional distribution for a future response, and use that distribution—not just its mean—to make predictions.

Advanced 10 min read

What You'll Learn

  • Translate a fitted linear predictor into a conditional inverse-Gaussian distribution.
  • Relate the fitted mean and dispersion to the distribution’s shape and variance.
  • Distinguish a predicted conditional mean from a prediction interval for an individual outcome.
  • Calculate event probabilities and interval probabilities using the inverse-Gaussian CDF.
  • Construct equal-tail prediction intervals and interpret their model-based coverage.
  • Recognize the limitations of plug-in predictions when fitted parameters are uncertain.

From a Fitted Mean to a Predictive Distribution

A fitted generalized linear model gives a mean response for a specified covariate pattern. That mean is useful, but it is not a forecast of the exact value a future individual will produce. To describe that individual outcome, the model supplies a conditional distribution: for an inverse-Gaussian GLM, its mean and dispersion determine the entire inverse-Gaussian distribution.

The distinction matters in clinical work. A fitted mean may summarize the expected treatment time for patients with given characteristics, while a prediction interval describes the range of times that may occur for one future patient. The interval is generally wider than uncertainty about the mean alone because it includes the natural variability of individual responses.

Definition: Suppose a fitted inverse-Gaussian GLM has estimated coefficient vector \(\hat{\beta}\) and estimated dispersion \(\hat{\phi}>0\). For a new covariate vector \(x_{\mathrm{new}}\), let \(\hat{\eta}_{\mathrm{new}}=x_{\mathrm{new}}^{\mathsf T}\hat{\beta}\) and \(\hat{\mu}_{\mathrm{new}}=g^{-1}(\hat{\eta}_{\mathrm{new}})\), where \(g\) is the model’s link. The plug-in predictive distribution for a future response \(Y_{\mathrm{new}}\), conditional on the covariates and fitted values, is inverse-Gaussian with mean \(\hat{\mu}_{\mathrm{new}}\) and dispersion \(\hat{\phi}\).

We use the parameterization in which an inverse-Gaussian random variable with mean \(\mu>0\) and dispersion \(\phi>0\) has density

$$ f(y;\mu,\phi)=\frac{1}{\sqrt{2\pi\phi y^3}} \exp\!\left[-\frac{(y-\mu)^2}{2\phi\mu^2y}\right], \qquad y>0. $$

Equivalently, its shape parameter is \(\lambda=1/\phi\). Its mean and variance are \(E[Y]=\mu\) and \(\operatorname{Var}(Y)=\phi\mu^3\). Thus, after fitting, the plug-in predictive variance is \(\hat{\phi}\hat{\mu}_{\mathrm{new}}^3\), and the predictive standard deviation is its square root. The distribution is supported on positive values.

Obtaining the Predictive Distribution

The first calculation is to evaluate the fitted linear predictor at the new covariates. Then apply the inverse link to get the fitted mean. The dispersion is common to observations in the usual inverse-Gaussian GLM, so the same fitted dispersion is used for the new response. The shape parameter in the density is \(1/\hat{\phi}\), not \(1/(\hat{\phi}\hat{\mu}_{\mathrm{new}})\).

Result: Under the inverse-Gaussian GLM assumption, conditional on the covariates, the response has mean \(\mu\) and dispersion \(\phi\). Replacing the unknown model quantities by their fitted values gives the plug-in prediction \(Y_{\mathrm{new}}\mid x_{\mathrm{new}},\hat{\beta},\hat{\phi}\sim\operatorname{IG}(\hat{\mu}_{\mathrm{new}},\hat{\phi})\), with variance \(\hat{\phi}\hat{\mu}_{\mathrm{new}}^3\).

To justify the result, the GLM specifies the conditional response distribution to be inverse-Gaussian with its conditional mean determined by the link and linear predictor, and with dispersion \(\phi\). At \(x_{\mathrm{new}}\), the fitted linear predictor is \(x_{\mathrm{new}}^{\mathsf T}\hat{\beta}\); applying \(g^{-1}\) gives \(\hat{\mu}_{\mathrm{new}}\). Substitution into the specified density gives the stated plug-in distribution. Its variance follows from the inverse-Gaussian variance formula, evaluated at those fitted parameters:

$$ \widehat{\operatorname{Var}}(Y_{\mathrm{new}}\mid x_{\mathrm{new}}) =\hat{\phi}\hat{\mu}_{\mathrm{new}}^3. $$

This result is a plug-in statement: it describes the response distribution when the fitted parameters are treated as fixed. It does not, by itself, incorporate uncertainty in estimating \(\beta\) or \(\phi\).

Worked Example: A Log-Link Prediction

Suppose the fitted model uses \(g(\mu)=\log(\mu)\), with \(\hat{\beta}_0=0\), \(\hat{\beta}_1=\log(2)\), and \(\hat{\phi}=0.25\). For a new subject with covariate \(x=1\), calculate the fitted mean, predictive variance, and predictive distribution.

The fitted linear predictor is

$$ \hat{\eta}=0+\log(2)(1)=\log(2). $$

Because the inverse log link is the exponential function, the fitted mean is

$$ \hat{\mu}=\exp(\log(2))=2. $$

The plug-in predictive variance is \(0.25(2^3)=0.25(8)=2\), so the predictive standard deviation is \(\sqrt{2}\approx1.4142\). The distribution is \(Y_{\mathrm{new}}\mid x=1,\hat{\beta},\hat{\phi}\sim\operatorname{IG}(2,0.25)\), equivalently with mean \(2\) and shape \(1/0.25=4\). The point prediction \(2\) is the conditional mean; it does not assert that the future response will equal \(2\).

Prediction Intervals and Probabilities

A prediction interval concerns a future response, rather than the unknown conditional mean. If the parameters were known, a central interval with nominal coverage \(1-\alpha\) could be formed from the inverse-Gaussian quantiles at probabilities \(\alpha/2\) and \(1-\alpha/2\). In a fitted model, these quantiles are ordinarily calculated from the plug-in distribution. Since the inverse-Gaussian density is positive for every \(y>0\), its CDF is continuous and strictly increasing there; the quantiles are therefore uniquely defined.

For calculation, write \(F(y;\mu,\phi)=P(Y\leq y)\). The inverse-Gaussian CDF has the closed form below, where \(\Phi\) is the standard normal CDF:

$$ F(y;\mu,\phi)= \Phi\!\left(\sqrt{\frac{1}{\phi y}}\left(\frac{y}{\mu}-1\right)\right) +\exp\!\left(\frac{2}{\phi\mu}\right) \Phi\!\left(-\sqrt{\frac{1}{\phi y}}\left(\frac{y}{\mu}+1\right)\right), \qquad y>0. $$

This expression uses \(\lambda=1/\phi\), the shape parameter in the equivalent mean-shape parameterization. A numerical prediction interval can be found by solving \(F(y;\hat{\mu},\hat{\phi})=p\) for each required probability \(p\). For an interval \((a,b]\), the predictive probability is \(F(b;\hat{\mu},\hat{\phi})-F(a;\hat{\mu},\hat{\phi})\).

Theorem: Let \(Y\) have a known inverse-Gaussian distribution with \(\mu>0\) and \(\phi>0\). For \(0<\alpha<1\), define \(q_p\) by \(F(q_p;\mu,\phi)=p\). Then \(P(q_{\alpha/2}<Y\leq q_{1-\alpha/2})=1-\alpha\).

Proof. The density is positive on \((0,\infty)\), so \(F\) is continuous and strictly increasing there. Consequently the quantiles in the statement exist uniquely, with \(F(q_{\alpha/2};\mu,\phi)=\alpha/2\) and \(F(q_{1-\alpha/2};\mu,\phi)=1-\alpha/2\). The event probability is the difference of the CDF values:

$$ P(q_{\alpha/2}<Y\leq q_{1-\alpha/2}) =F(q_{1-\alpha/2};\mu,\phi)-F(q_{\alpha/2};\mu,\phi) =(1-\alpha/2)-\alpha/2 =1-\alpha. $$

This is an exact coverage statement when \(\mu\) and \(\phi\) are known. With fitted values substituted, it is the nominal coverage under the plug-in predictive distribution; it does not guarantee exact repeated-sampling coverage after accounting for model fitting. \(\square\)

Worked Example: Checking a Central Prediction Interval

For a future response with plug-in parameters \(\hat{\mu}=1\) and \(\hat{\phi}=0.25\), assess the probability assigned to the interval \((0.412,1.96]\). Here \(1/\hat{\phi}=4\). At \(y=0.412\), the first CDF term is approximately \(0.03347\), and the second is approximately \(0.01616\). Therefore,

$$ F(0.412;1,0.25)\approx 0.03347+0.01616=0.04963. $$

At \(y=1.96\), the first term is approximately \(0.91488\), and the second is approximately \(0.03505\). Their sum is \(0.94993\), so

$$ P(0.412<Y_{\mathrm{new}}\leq1.96) \approx0.94993-0.04963=0.90030. $$

The interval therefore has approximately \(90.03\%\) plug-in predictive probability. Its lower and upper tail probabilities are approximately \(4.963\%\) and \(1-0.94993=5.007\%\), respectively. They are close to, but not exactly, \(5\%\) each; these rounded endpoints give an approximately central \(90\%\) interval.

Worked Example: Probability of Exceeding the Fitted Mean

Suppose a new response has plug-in parameters \(\hat{\mu}=1\) and \(\hat{\phi}=0.25\). Find the probability that it exceeds its fitted mean, \(1\). Substituting \(y=\mu=1\) into the CDF formula makes the first normal argument zero. The second argument is \(-\sqrt{4}(1+1)=-4\), and the exponential factor is \(\exp(2/(0.25\cdot1))=\exp(8)\). Thus

$$ F(1;1,0.25)=\Phi(0)+\exp(8)\Phi(-4) \approx 0.5+(2980.95799)(0.0000316712) \approx0.59441. $$

Hence \(P(Y_{\mathrm{new}}>1)=1-F(1;1,0.25)\approx0.40559\). The response distribution is not symmetric about its mean, so the mean need not split its probability into equal halves. In particular, the fitted mean alone is insufficient to determine this exceedance probability; the dispersion is also needed.

Interpreting the Prediction

A fitted conditional mean and a prediction interval answer different questions. The mean summarizes the expected response for the covariate pattern. A prediction interval describes the spread of a future individual response under the assumed conditional distribution. The interval therefore uses both \(\hat{\mu}\) and \(\hat{\phi}\), through the full distribution—not just the fitted mean or its standard error.

A practical calculation follows a short sequence:

1
Evaluate the linear predictor.
Calculate \(x_{\mathrm{new}}^{\mathsf T}\hat{\beta}\) using the new subject’s covariates.
2
Apply the inverse link.
Set \(\hat{\mu}_{\mathrm{new}}=g^{-1}(x_{\mathrm{new}}^{\mathsf T}\hat{\beta})\).
3
Specify the predictive distribution.
Use mean \(\hat{\mu}_{\mathrm{new}}\) and dispersion \(\hat{\phi}\), or shape \(1/\hat{\phi}\).
4
Answer the prediction question.
Report the mean for a point prediction, or use the CDF or quantiles for a probability or prediction interval.

Common Mistake: Treating the Mean as the Prediction Interval

A common error is to calculate \(\hat{\mu}_{\mathrm{new}}\) and report it as though it describes the likely range of an individual future response. For example, from \(\hat{\mu}=2\) and \(\hat{\phi}=0.25\), the fitted mean is \(2\), but the predictive variance is \(2\), not zero. The value \(2\) is a point summary; it is not an interval and does not convey the response’s spread.

Another error is to use a symmetric normal-style interval around the mean without justification. The inverse-Gaussian predictive distribution has positive support and is generally asymmetric. Its interval endpoints should be obtained from its CDF or quantiles. Finally, a plug-in interval treats estimated parameters as fixed. It captures response variability under the fitted model, but does not automatically include additional uncertainty from estimating the regression coefficients and dispersion.

Key takeaway: For a new covariate pattern, the inverse link gives the fitted conditional mean and the fitted dispersion completes the plug-in inverse-Gaussian distribution. Use the mean for a point prediction; use that full distribution for probabilities and individual-response prediction intervals.

Check Your Understanding

Use the fitted conditional distribution—not only its mean—to reason about future responses.

  1. A fitted model gives \(\hat{\mu}_{\mathrm{new}}=3\) and \(\hat{\phi}=0.2\). What are the plug-in predictive variance and shape parameter?
  2. In words, distinguish a fitted conditional mean from a prediction interval for one future response.
  3. For known inverse-Gaussian parameters, why does subtracting two CDF values give the probability of an interval \((a,b]\)?
  4. What does a nominal \(90\%\) plug-in prediction interval mean, and why is that not automatically an exact repeated-sampling guarantee after fitting the model?
  5. Why is it generally unjustified to construct a symmetric interval around an inverse-Gaussian fitted mean?
Clinical Biostats