Tutorials › Exam SRM - Statistics for Risk Modeling › Valid Link Functions And Inverse Links

Exam SRM · Exponential-Family Models · Tutorial 282 of 926

Valid Link Functions And Inverse Links

Check link functions by matching their ranges and inverse-link outputs to the allowable conditional-mean values.

Intermediate 10 min read

What You'll Learn

  • State the mean domain for bounded and positive response distributions.
  • Check whether a link covers the predictor values the model can produce.
  • Verify that an inverse link always returns an allowable conditional mean.
  • Derive and use the inverse of a logit link.
  • Identify why some links work only when the predictor is restricted.
  • Avoid confusing an inverse function with a reciprocal.

Why Link Validity Is a Range Question

A generalized linear model connects predictors to a response distribution through its conditional mean. That connection must respect the values the mean is allowed to take. For instance, a Bernoulli conditional mean is a probability, while a Poisson conditional mean is positive. A formula that produces a negative mean for some predictor value cannot serve as an unrestricted inverse link for either model.

The key check is therefore not just whether a function can be inverted algebraically. Ask whether its inverse is defined for every predictor value the model can produce and whether every resulting mean is allowable. In a standard GLM with an unrestricted linear predictor, those predictor values can be any real number.

Definition: Let \(\mu=E[Y\mid \boldsymbol{x}]\) be the conditional mean, and let \(\mathcal{M}\) be the allowable domain of that mean for the response distribution. A link function \(g\) relates the mean to the linear predictor \(\eta\) through \(g(\mu)=\eta\). Its inverse link \(g^{-1}\) must return a value in \(\mathcal{M}\). If \(\eta\) is unrestricted over the real line, a standard one-to-one link must map the relevant mean domain onto the real line so that \(g^{-1}(\eta)\) is allowable for every real \(\eta\).

The allowable domain depends on the response distribution. For a Bernoulli response, the conditional mean is a probability and lies in \([0,1]\); nondegenerate Bernoulli models use \(0<\mu<1\). For Poisson and gamma responses, the usual mean domain is \(\mu>0\). Thus, a link whose inverse takes arbitrary real inputs may still be unsuitable if some of those inputs yield means outside the relevant domain.

Often a GLM has \(\eta=\boldsymbol{x}^{\mathsf T}\boldsymbol{\beta}\). With no restrictions on \(\boldsymbol{\beta}\) or on the predictors, this linear predictor can range over all real values. A link that works only for, say, \(\eta<0\) is not sufficient for that unrestricted model. It might be usable in a specially constrained model, but its validity would then depend on proving that the predictor always stays in the link's range.

Checking a Link and Its Inverse

For a proposed link, check three things in order: identify the mean domain, determine the range of the link on that domain, and solve for the inverse. Then test the inverse at predictor values outside and inside the link's range. If the model allows predictors outside that range, the inverse cannot define the conditional mean for every possible linear predictor.

1
State the mean domain.
Use the response distribution to identify allowable values, such as \(0<\mu<1\) for an interior Bernoulli mean or \(\mu>0\) for a Poisson mean.
2
Find the link's range.
Determine which \(\eta\) values can be written as \(g(\mu)\) for allowable \(\mu\). A one-to-one link has a well-defined inverse on that range.
3
Check the inverse over the predictor range.
For an unrestricted predictor, test whether \(g^{-1}(\eta)\) exists and belongs to the mean domain for every real \(\eta\).
4
State any restriction needed.
If validity holds only for a subset of predictor values, say so explicitly. Do not treat a restricted-range inverse as valid for an unrestricted linear predictor.

A Bounded Mean: The Logit Link

For an interior Bernoulli mean, one common link is the logit, \(g(\mu)=\log\{\mu/(1-\mu)\}\), with \(0<\mu<1\). Its range is all real numbers: as \(\mu\) approaches 0, the link tends to negative infinity, and as \(\mu\) approaches 1, it tends to positive infinity. This makes it suitable when \(\eta\) can be any real number.

Derivation: To obtain the inverse, start with \(\eta=\log\{\mu/(1-\mu)\}\). Exponentiate, rearrange, and solve for \(\mu\):
$$ e^\eta=\frac{\mu}{1-\mu} \quad\Longrightarrow\quad e^\eta(1-\mu)=\mu \quad\Longrightarrow\quad e^\eta=\mu(1+e^\eta) \quad\Longrightarrow\quad \mu=\frac{e^\eta}{1+e^\eta}. $$
For every real \(\eta\), \(e^\eta>0\), so \(0<e^\eta/(1+e^\eta)<1\). The inverse therefore returns an allowable interior Bernoulli mean for every finite predictor value.

Worked Example: Checking a Bounded-Mean Link

Hypothetical scenario. A model describes whether a policyholder submits a claim during a specified month. Assume a Bernoulli response with conditional mean \(\mu\), and use the logit link. For a policyholder with linear predictor \(\eta=\log 3\), calculate the fitted conditional mean and verify that the link is valid for any real predictor. Name the method and a common mistake to avoid.

Method. Derive the inverse link, substitute the specified predictor, and check its range rather than assuming that a probability output is automatically valid.

From the inverse derived above, \(g^{-1}(\eta)=e^\eta/(1+e^\eta)\). Since \(\eta=\log 3\), \(e^\eta=e^{\log 3}=3\). Therefore,

$$ \widehat{\mu} =\frac{3}{1+3} =\frac{3}{4} =0.7500. $$

The fitted conditional probability is \(0.7500\). For any real \(\eta\), the numerator \(e^\eta\) is positive and the denominator is \(1+e^\eta\), which exceeds the numerator. Hence the inverse always lies strictly between 0 and 1. This link is compatible with an unrestricted predictor and an interior Bernoulli mean. The check confirms that the computed value is allowable.

Common mistake avoided: Treating the odds \(e^\eta=3\) as the probability. The odds are 3 to 1; converting to a probability requires \(3/(1+3)=0.75\).

Positive Means and the Log Link

For a Poisson or gamma response with positive conditional mean, the log link \(g(\mu)=\log\mu\) is suitable for an unrestricted predictor. Its domain is \(\mu>0\), and its range is all real numbers. Solving \(\eta=\log\mu\) gives \(g^{-1}(\eta)=e^\eta\), which is positive for every real \(\eta\). A finite predictor gives a strictly positive mean, not a mean of zero.

Worked Example: Checking a Positive-Mean Prediction

Hypothetical scenario. A Poisson model describes the number of service calls received by a small facility during a fixed week. Assume the conditional response distribution is Poisson, so its mean must be positive, and use the log link. For a facility with \(\eta=-0.4\), calculate the fitted mean and determine whether the link works for an unrestricted predictor. Round the mean to four decimal places.

Method. Apply the inverse of the log link, then verify positivity for the specified value and for general real predictors.

The inverse is \(g^{-1}(\eta)=e^\eta\). Substitution gives

$$ \widehat{\mu}=e^{-0.4}=0.670320\ldots\approx 0.6703. $$

The value is positive, as required for a Poisson mean. More generally, \(e^\eta>0\) for every real \(\eta\), so the log link is compatible with an unrestricted predictor and a positive mean. The fitted mean need not be an integer: it is the expected number of calls, not a realized count. Rounded to four decimal places, the answer is \(0.6703\).

Common mistake avoided: Rejecting the link because a negative predictor produces a mean below 1. Positivity, not a lower bound of 1, is the required condition.

When an Algebraic Inverse Is Not Enough

An inverse formula may exist but still fail the GLM range check. For example, consider the proposed link \(g(\mu)=\log\{\mu/(1+\mu)\}\) for a positive mean. For every \(\mu>0\), the ratio \(\mu/(1+\mu)\) is between 0 and 1, so the logarithm is negative. The link's range is therefore \((-\infty,0)\), not all real numbers.

Solving for the inverse makes the restriction explicit. Exponentiating gives \(e^\eta=\mu/(1+\mu)\), which rearranges to \(\mu=e^\eta/(1-e^\eta)\). The denominator is positive only when \(\eta<0\). Thus the inverse produces a positive mean only on that restricted predictor range.

Worked Example: Detecting an Invalid Positive-Mean Inverse

Hypothetical scenario. A modeler proposes \(g(\mu)=\log\{\mu/(1+\mu)\}\) for a positive conditional mean and allows the linear predictor to be any real number. Check the proposed inverse at \(\eta=0.2\), and then at \(\eta=-\log 3\). Explain whether the link is valid for the stated model. Round the first inverse value to four decimal places.

Method. Solve the link equation and check the inverse on both sides of its range boundary. The common mistake is to assume that any algebraic inverse works for every predictor.

From \(\eta=\log\{\mu/(1+\mu)\}\), the inverse is \(\mu=e^\eta/(1-e^\eta)\), which requires \(\eta<0\). For \(\eta=0.2\),

$$ e^{0.2}=1.221402758\ldots,\qquad 1-e^{0.2}=-0.221402758\ldots, $$

so

$$ g^{-1}(0.2) =\frac{1.221402758\ldots}{-0.221402758\ldots} \approx -5.5167. $$

This is negative and therefore not an allowable positive mean. For the second predictor, \(\eta=-\log 3\), we have \(e^\eta=1/3\), so

$$ g^{-1}(-\log 3) =\frac{1/3}{1-1/3} =\frac{1/3}{2/3} =\frac{1}{2}. $$

The second value is positive, but that does not rescue the proposed unrestricted model: the first predictor is allowed by the model and yields an invalid mean. The link could only be used if the predictor were constrained to \(\eta<0\). The first inverse, rounded to four decimal places, is \(-5.5167\).

Common mistake avoided: Checking the inverse at one convenient negative predictor and concluding that it is valid everywhere. The predictor range must be checked in full.

Restricted-Range Links and Boundary Values

A simple affine link illustrates why checking the range matters even when the inverse looks harmless. Let \(g(\mu)=2\mu-1\) for an interior bounded mean \(0<\mu<1\). Its range is \((-1,1)\), and the inverse is \(\mu=(\eta+1)/2\). That inverse is allowable only when \(-1<\eta<1\). At \(\eta=1.4\), it gives \(\mu=1.2\), outside the bounded mean domain.

Worked Example: A Bounded Link That Needs a Predictor Restriction

Hypothetical scenario. A model for a Bernoulli response uses \(g(\mu)=2\mu-1\), with \(0<\mu<1\). A proposed predictor is \(\eta=0.4\). Calculate the corresponding mean, then determine whether this link is valid if predictors can take any real value. State the restriction under which it would be usable.

Method. Invert the affine link, calculate the specified fitted mean, and compare the link's full range with the assumed predictor range.

Solving \(\eta=2\mu-1\) gives \(\mu=(\eta+1)/2\). At \(\eta=0.4\),

$$ \widehat{\mu}=\frac{0.4+1}{2}=\frac{1.4}{2}=0.7. $$

The specified predictor gives an allowable mean. However, the link range for \(0<\mu<1\) is \(-1<\eta<1\), not the whole real line. For example, \(\eta=1.4\) gives \(\mu=(1.4+1)/2=1.2\), which is not a probability. The link is therefore invalid for an unrestricted predictor; it is usable only if the model guarantees \(-1<\eta<1\). The calculated value for \(\eta=0.4\) is \(0.7\).

Common mistake avoided: Judging link validity from the one predictor value in the calculation. Validity is a property of the whole predictor range allowed by the model.

Common Checks and Exam Traps

The most reliable habit is to write down both ranges before doing any numerical work: the allowable mean values and the predictor values the model can produce. Then verify that the inverse sends the latter into the former. This is especially important when a candidate link has a denominator that can be zero or change sign.

  • Confusing inverse with reciprocal. The inverse function \(g^{-1}\) undoes \(g\); it does not mean \(1/g\). For example, the inverse of \(\log\mu\) is \(e^\eta\), not \(1/\log\eta\).
  • Checking only a single fitted value. An inverse may give an allowable mean at one predictor value and fail elsewhere. Check every predictor value permitted by the model.
  • Ignoring the sign of a denominator. In \(e^\eta/(1-e^\eta)\), the denominator is positive only for \(\eta<0\). A positive \(\eta\) produces a negative result.
  • Confusing a finite predictor with a boundary mean. Common links such as logit and log produce interior or strictly positive means for finite \(\eta\). Boundary values such as 0 or 1 for a Bernoulli mean may correspond only to limiting predictor values, not finite ones.
  • Assuming all links must be unrestricted. A restricted link is not automatically impossible, but the model must enforce its predictor restriction. Without that condition, the inverse may fail.
Key takeaway: A proposed link is suitable only when its inverse is defined and returns an allowable conditional mean throughout the predictor range used by the model. For an unrestricted linear predictor, test the inverse over all real \(\eta\), not just at the values that happen to appear in one calculation.

Check Your Understanding

For each question, check both the inverse calculation and the range condition.

  1. A bounded mean satisfies \(0<\mu<1\), and a proposed link is \(g(\mu)=4\mu-2\). What is its link range, and is it valid for an unrestricted real predictor? (Answer: The range is \((-2,2)\); no, it requires \(-2<\eta<2\).)
  2. A positive mean uses the log link, and a fitted predictor is \(\eta=\log(1.25)\). Find the mean and state whether the inverse is positive for every real predictor. (Answer: \(\mu=1.25\); yes, \(e^\eta>0\) for every real \(\eta\).)
  3. For a Bernoulli mean, use the logit inverse at \(\eta=-\log 4\). Find the conditional mean to four decimal places. (Answer: \(\mu=1/(1+4)=0.2000\).)
  4. A positive mean uses \(g(\mu)=\log\{\mu/(1+\mu)\}\). Find the inverse at \(\eta=-\log 3\), and state why the link still fails for an unrestricted predictor. (Answer: \(\mu=0.5\); the link range is \((-\infty,0)\), so nonnegative predictors have no allowable positive inverse.)
  5. A bounded mean uses \(g(\mu)=\log(1-\mu)\), with \(0<\mu<1\). Solve for the inverse and evaluate it at \(\eta=0.1\). Is the link suitable for an unrestricted predictor? (Answer: \(\mu=1-e^\eta\), so at \(0.1\) it is approximately \(-0.1052\); no, the link range is \((-\infty,0)\).)
Clinical Biostats