Tutorials › Regression Analysis (Undergraduate) › Johnson-Neyman Regions Within Observed Data

Simple Slopes and Marginal Effects · Tutorial 382 of 991

Johnson-Neyman Regions Within Observed Data

Use a confidence-bound equation to locate where a conditional slope is distinguishable from zero, then limit the conclusion to the observed moderator range.

Intermediate 10 min read

What You'll Learn

  • Express the conditional slope and its standard error in a two-predictor interaction model
  • Derive the equation whose roots mark where a confidence interval touches zero
  • Classify moderator values as inside or outside the Johnson-Neyman region
  • Handle cases with two roots, no roots, or roots outside the observed range
  • Report conclusions without extrapolating beyond observed moderator values

From Selected Moderator Values to a Region

In an interaction model, the slope relating one predictor to an outcome depends on the value of a moderator. A confidence interval at one chosen moderator value answers a local question: does the interval for the conditional slope include zero there? Johnson-Neyman analysis extends that question across the moderator's range, locating the values at which the interval changes from including zero to excluding it.

The result is a set of moderator values where the estimated conditional slope is statistically distinguishable from zero at a specified confidence level. It is not a claim that the slope is exactly zero elsewhere. The region must also be restricted to moderator values actually observed in the data; a calculated boundary outside that range does not justify a conclusion about unobserved cases.

Model and Conditional-Slope Uncertainty

Let \(Y_i\) be an outcome, \(X_i\) a predictor of interest, and \(Z_i\) a continuous moderator for observation \(i\). Consider the two-predictor interaction model:

$$ Y_i=\beta_0+\beta_1X_i+\beta_2Z_i+\beta_3X_iZ_i+\varepsilon_i. $$

For the usual linear-model confidence intervals, assume the conditional mean is correctly represented by this model, the errors are independent with mean zero and common variance, and the errors are normally distributed for exact \(t\)-based inference. The model must also be identifiable, so its coefficient estimates and their estimated covariance matrix can be calculated. In particular, an interaction coefficient describes how the \(X\) slope changes with \(Z\); it does not itself give the slope at every moderator value.

Definition: At moderator value \(z\), the conditional slope of the mean outcome with respect to \(X\) is \(\beta_1+\beta_3z\). Its estimate is \(b_1+b_3z\), where \(b_1\) and \(b_3\) estimate \(\beta_1\) and \(\beta_3\). The estimated variance of this slope is \(\widehat{\operatorname{Var}}(b_1)+2z\widehat{\operatorname{Cov}}(b_1,b_3)+z^2\widehat{\operatorname{Var}}(b_3)\).

The covariance term matters: the uncertainty in a sum of estimates depends not only on each estimate's variance but also on how the estimates vary together. Write the standard error of the conditional slope as \(SE(z)\), the residual degrees of freedom as \(df\), and the two-sided \(t\) critical value as \(c=t_{1-\alpha/2,df}\). The pointwise confidence interval is:

$$ (b_1+b_3z)\ \pm\ c\,SE(z). $$

In the examples below, \(c=2.000\) is used as a rounded illustrative critical value to keep the arithmetic clear. In an analysis, use the critical value for the chosen confidence level and the model's \(df\).

The Johnson-Neyman Boundary

A confidence interval excludes zero when its entire span is above zero or its entire span is below zero. For an interval centered at \(b_1+b_3z\) with half-width \(cSE(z)\), this happens precisely when the absolute value of the center exceeds the half-width. Squaring both nonnegative quantities gives a convenient test:

$$ |b_1+b_3z|>cSE(z) \quad\Longleftrightarrow\quad Q(z)=(b_1+b_3z)^2-c^2SE(z)^2>0. $$

The Johnson-Neyman boundaries are the real roots of \(Q(z)=0\). At a root, the confidence interval touches zero. Where \(Q(z)>0\), the interval excludes zero; where \(Q(z)<0\), it includes zero. Since the slope estimate is linear in \(z\) and its variance is quadratic in \(z\), \(Q(z)\) is at most quadratic. Its roots divide the moderator axis into intervals on which the sign can be checked.

Worked Example: Two Boundaries, Only One in the Observed Range

Suppose a hypothetical fitted model has \(b_1=1.000\), \(b_3=-0.2500\), \(\widehat{\operatorname{Var}}(b_1)=0.0400\), \(\widehat{\operatorname{Cov}}(b_1,b_3)=0\), and \(\widehat{\operatorname{Var}}(b_3)=0.002500\). Suppose the observed moderator values run from 0 to 6, and use \(c=2.000\). Find where the conditional-slope interval excludes zero within that range.

The estimated slope at \(z\) is \(1.000-0.2500z\). Its variance and the boundary expression are:

$$ SE(z)^2=0.0400+0.002500z^2, \qquad Q(z)=(1.000-0.2500z)^2-4(0.0400+0.002500z^2). $$

Expanding gives:

$$ Q(z)=0.8400-0.5000z+0.05250z^2. $$

Setting this expression to zero and using the quadratic formula:

$$ z=\frac{0.5000\pm\sqrt{(-0.5000)^2-4(0.05250)(0.8400)}}{2(0.05250)} =\frac{0.5000\pm\sqrt{0.07360}}{0.1050} \approx 2.178,\ 7.346. $$

The coefficient of \(z^2\) is positive, so \(Q(z)>0\) outside the two roots and \(Q(z)<0\) between them. Restricting to the observed range \(0\leq z\leq6\), the interval excludes zero for \(0\leq z<2.178\), touches zero at about \(z=2.178\), and includes zero for \(2.178<z\leq6\). The second root, about 7.346, is outside the data's moderator range and is not a basis for interpreting slopes there. For example, at \(z=0\), the estimated slope is \(1.000\), with standard error \(0.2000\), giving an interval \(1.000\pm2(0.2000)=[0.6000,1.400]\) in outcome units per \(X\) unit.

Solving and Checking the Region

A reliable calculation has two distinct parts: find possible boundaries algebraically, then determine the sign of \(Q(z)\) between them. The roots alone do not say which regions exclude zero. Nor should a root outside the moderator values in the data be reported as a practically supported boundary.

1
Write the estimated slope and its variance.
Use \(b_1+b_3z\) and include both the variance and covariance terms when calculating \(SE(z)^2\).
2
Form the boundary equation.
Calculate \(Q(z)=(b_1+b_3z)^2-c^2SE(z)^2\), then solve \(Q(z)=0\).
3
Classify the intervals.
Use the sign of \(Q(z)\), either from the quadratic's shape or by testing a value in each interval. Positive means the interval excludes zero; negative means it includes zero.
4
Restrict and report.
Keep only the classified portions within the observed moderator range, and state the confidence level, direction where relevant, and slope units.

If there are no real roots, \(Q(z)\) does not cross zero. Its sign can be determined at one value in the observed range and will be the same throughout that range. If roots do exist, test a value in each relevant interval or use the quadratic's leading coefficient and sign changes. Always check the result against a direct confidence interval at a value where the classification matters; this can reveal arithmetic or sign errors.

Worked Example: A Significant Slope Throughout the Observed Range

In a second hypothetical analysis, let \(b_1=0.5000\), \(b_3=0.1000\), \(\widehat{\operatorname{Var}}(b_1)=0.0100\), \(\widehat{\operatorname{Cov}}(b_1,b_3)=0\), and \(\widehat{\operatorname{Var}}(b_3)=0.001000\). Suppose the observed moderator range is \(0\leq z\leq4\), and use \(c=2.000\).

The conditional slope is \(0.5000+0.1000z\), and its variance is \(0.0100+0.001000z^2\). Therefore:

$$ Q(z)=(0.5000+0.1000z)^2-4(0.0100+0.001000z^2) =0.006000z^2+0.1000z+0.2100. $$

For \(z\geq0\), all three terms in the final expression are nonnegative and the constant term is positive. Thus \(Q(z)>0\) throughout the observed range: the pointwise confidence interval excludes zero at every observed-range moderator value. As a numerical check at \(z=4\), the estimated slope is \(0.9000\), its standard error is \(\sqrt{0.0100+0.001000(16)}=\sqrt{0.02600}\approx0.1612\), and the interval is \(0.9000\pm2(0.1612)\), or approximately \([0.5775,1.222]\) outcome units per \(X\) unit. It is entirely positive, consistent with \(Q(4)>0\).

Worked Example: No Significant Slope Within the Observed Range

For a third hypothetical fit, suppose \(b_1=0.1000\), \(b_3=0.05000\), \(\widehat{\operatorname{Var}}(b_1)=0.0400\), \(\widehat{\operatorname{Cov}}(b_1,b_3)=0\), and \(\widehat{\operatorname{Var}}(b_3)=0.002500\). The observed moderator range is \(0\leq z\leq5\), with \(c=2.000\). Determine whether any part of this range has an interval excluding zero.

The variance of the estimated slope is \(0.0400+0.002500z^2\), so:

$$ Q(z)=(0.1000+0.05000z)^2-4(0.0400+0.002500z^2) =-0.1500+0.01000z-0.007500z^2. $$

This quadratic opens downward. Its maximum occurs at \(z=-b/(2a)=-0.01000/[2(-0.007500)]=0.6667\). At that value,

$$ Q(0.6667)\approx-0.1500+0.006667-0.003333=-0.1467<0. $$

Because even the maximum is negative, \(Q(z)<0\) throughout the observed range. The interval includes zero at every such value; there is no Johnson-Neyman region in the observed data where the slope's interval excludes zero. At \(z=5\), for example, the estimated slope is \(0.3500\), the standard error is \(\sqrt{0.0400+0.002500(25)}=\sqrt{0.1025}\approx0.3202\), and the interval is approximately \(0.3500\pm0.6403=[-0.2903,0.9903]\) outcome units per \(X\) unit. This direct check also includes zero.

Interpretation and a Common Pitfall

A Johnson-Neyman result describes where a particular pointwise confidence interval for the conditional slope excludes zero, given the model and confidence level. For example, a report might state that, within the observed moderator range, the estimated slope is positive and its 95% pointwise confidence interval excludes zero below a specified moderator boundary. State the moderator's units and the slope's units, and make clear whether the interval excludes zero on the positive or negative side.

A common mistake is to solve for the roots and then treat the entire real number line as if it were supported by the data. A boundary at \(z=7.346\) does not establish what the conditional slope or its uncertainty means at \(z=7.346\) when observed moderator values only run from 0 to 6. The correction is to intersect the calculated regions with the observed moderator range before drawing conclusions. Restriction to that range avoids this particular extrapolation, though it does not by itself show that every value within the range has equally strong data support.

Another mistake is to say that the slope is zero wherever its interval includes zero. An interval including zero means the data and model do not distinguish that slope from zero at the stated confidence level; it does not prove the true slope is zero. Likewise, excluding zero is not evidence of a causal effect unless the study design and assumptions support causal interpretation. These are pointwise intervals: the confidence level applies at each moderator value considered, not automatically to the whole collection of values simultaneously.

Key takeaway: Solve \(Q(z)=0\) to locate where a conditional-slope confidence interval touches zero, use the sign of \(Q(z)\) to identify where it excludes zero, and report only the resulting region within the moderator values observed.

Check Your Understanding

Use the model, boundary equation, and observed-range restriction to answer these questions.

  1. In the interaction model, write the estimated conditional slope at moderator value \(z\).
  2. What does \(Q(z)=0\) mean for the conditional-slope confidence interval? What does \(Q(z)>0\) mean?
  3. Why must the covariance between \(b_1\) and \(b_3\) be included when calculating the slope variance?
  4. If a quadratic has two roots but only one falls within the observed moderator range, which roots and regions should guide the interpretation?
  5. Explain why an interval that includes zero does not establish that the conditional slope is exactly zero.