Influence analysis: leverage and Cook's distance

Influence analysis: leverage and Cook's distance

Influence analysis: leverage and Cook's distance

On this page

Learning Outcome Statement

Describe influence analysis and methods of detecting influential data points.

On the exam: You receive a sample monthly retailer regression with the observation count, parameter count, mean squared error, residual, and leverage, then classify the observation or calculate Cook's distance in a vignette-based item set or MCQ.

Influence analysis asks whether including a particular observation changes the fitted regression enough to change its coefficients or fitted values. A point can be unusual in its independent-variable combination, far from the fitted outcome, or both. The last case can let a month drive the model's story.

Leverage looks only at independent-variable values. Cook's distance combines leverage with residual size and estimates how much the fitted regression could move. A high-leverage point with a small residual may sit far from the predictor center yet stay close to the fitted regression.

MeasureSignal sourceCheck alongside
Leverage $h_{ii}$Independent-variable combinationResidual and Cook's distance
Residual $e_i$Observed minus fitted outcomeLeverage
Cook's distance $D_i$Residual and leverageFitted regression with and without point

Leverage is a screen for unusual predictors, not a verdict on influence. Investigate a flagged point by checking its residual and Cook's distance, then compare the fitted regression with and without it.

Read the measures together when you review a regression. Leverage tells you whether a month's advertising spend and foot traffic combination is unusual; the residual tells you how far its sales growth sits from the fitted value. Cook's distance brings those signals together to estimate whether the month could shift the fitted regression. A screen identifies where to look, while the combined diagnostic helps judge the possible effect.

For observation $i$, the residual $e_i$ is observed minus fitted outcome. The parameter count $p$ includes the intercept, $n$ is the observation count, and MSE is the regression mean squared error. Screen $h_{ii}$ against $2p/n$. Use $3p/n$ as a more conservative rule of thumb. Cook's distance, $D_i$, combines the residual and leverage to estimate how much the fitted regression may change.

$$ D_i = \left(\frac{e_i^2}{p\mathrm{MSE}}\right)\left(\frac{h_{ii}}{(1-h_{ii})^2}\right) $$

The squared residual makes a large miss count more than proportionally. The denominator $p\mathrm{MSE}$ scales the miss by model noise and parameter count, while the leverage fraction raises the result and its squared denominator makes the rise sharper as $h_{ii}$ approaches $1$. The ratio is dimensionless, and a large residual combined with high leverage creates the greatest influence risk.

Worked example

You are handed a sample monthly regression for a retailer's same-store sales growth on advertising spend and foot traffic. It is an ordinary least squares sample regression with an intercept, and the supplied MSE uses residual degrees of freedom. You need to decide whether the highlighted month deserves an influence check and calculate its Cook's distance from the observation count $n$, parameter count $p$, MSE, residual $e_i$, and leverage $h_{ii}$.

GivenValue
Observation count, $n$24 monthly observations
Parameter count, $p$3 parameters, including intercept
Mean squared error, MSE0.25 percentage-points-squared
Residual, $e_i$0.8 percentage points
Leverage, $h_{ii}$0.28 dimensionless

Hold the residual scale from this case fixed. The line shows how Cook's distance changes with leverage. With the miss size unchanged, each increase in leverage raises the distance, and the rise accelerates near the high end because leverage also appears in the denominator as $(1-h_{ii})^2$. Read the line as a diagnostic comparison across leverage values, not as a new cutoff for deciding influence.

Loading diagram…

At leverage values of 0.05, 0.15, 0.25, and 0.35, Cook's distance is 0.047, 0.177, 0.379, and 0.707, respectively. These paired values make the curve concrete: holding the residual scale fixed, the diagnostic rises more sharply at higher leverage. Use the worked inputs below to calculate the case result, then interpret it with the leverage screens rather than treating any single value as an automatic deletion rule.

  1. Screen predictor position first. This separates an unusual independent-variable combination from an ordinary one. The usual screen is $2p/n = \frac{2 \times 3}{24} = 0.2500$. The conservative screen is $3p/n = \frac{3 \times 3}{24} = 0.3750$. The observed leverage $0.28$ is above the usual screen but below the conservative screen.

  2. Put residual size on the model scale. Squaring the residual removes its sign. It produces $e_i^2 = 0.8^2 = 0.6400$. The parameter scale is $p\mathrm{MSE} = 3 \times 0.25 = 0.7500$. Their ratio is $0.6400 / 0.7500 = 0.8533$.

  3. Insert the residual scale and leverage into Cook's distance. This combines outcome miss and predictor unusualness rather than treating leverage alone as influence. It produces $D_i = 0.8533 \times \frac{0.28}{(1 - 0.28)^2} = 0.461$.

The month is a candidate for investigation, not an automatic deletion, because its predictor position is unusual enough to screen while Cook's distance measures possible fit movement.

Changed condition

The same retailer regression now has a lower leverage input for the highlighted month. All other inputs stay unchanged.

QuantityOriginalChanged
Leverage $h_{ii}$0.280.12
Usual screen $2p/n$0.25000.2500
Cook's distance $D_i$0.4610.132

Before calculating, predict that Cook's distance will fall because the residual scale is unchanged and the leverage term is smaller. The observation now falls below the usual leverage screen, and the distance is $0.132$ rather than $0.461$. The diagnostic signal is weaker, although the point still deserves context. Before reading on, recompute $D_i$ from $h_{ii}=0.12$ and explain why it falls.

Common error

A candidate sees predictor values far from the sample center and calls the observation influential automatically. That feels right because an unusual independent-variable combination can pull the fitted regression. The giveaway is high leverage paired with a small residual and a modest Cook's distance, which signals an unusual point without material change to the fit.

Calculator

KeysDisplay
0.8 × 0.8 =0.6400
3 × 0.25 =0.7500
0.6400 ÷ 0.7500 =0.8533
0.8533 × 0.28 ÷ (1 - 0.28)^2 CPT0.461

Check yourself

Practice

A retailer's ordinary least squares sample regression uses 24 monthly observations and 3 parameters including the intercept. Its MSE is 0.25 percentage-points-squared. Observation A has residual 0.8 percentage points and leverage 0.28.

Question 1

Using the usual leverage screen, what value should the analyst compare with observation A's leverage?

Question 2

How should observation A's leverage be classified against the screens?

Question 3

What is observation A's Cook's distance?

Question 4

What is the best action after these diagnostics?

Only the highlighted observation's leverage changes from 0.28 to 0.12. Which result follows?

Which observation has the greatest influence risk?

Revision snapshot

You use leverage $h_{ii}$ to ask whether an observation's independent-variable combination sits far from the rest. A high-leverage point is not automatically influential. Compare leverage with $2p/n$, then use $3p/n$ when you want the more conservative screen.

$$ D_i = \frac{e_i^2}{p\mathrm{MSE}}\frac{h_{ii}}{(1-h_{ii})^2} $$

Cook's distance asks whether the fitted regression moves materially when you include the observation. Investigate the point instead of deleting it automatically. The greatest influence risk comes from a large residual paired with high leverage. On the exam, use the supplied regression inputs to classify the observation or calculate Cook's distance.

Unlock the full lesson and continue reading

Signup to continue reading this lesson and unlimited access questions, flashcards, AI notes, and more

Scan to download app

Scan to download
UNLOCK FREE ACCESS

Practice Questions: Influence analysis: leverage and Cook's distance

  1. 1. Atlas Systematic Strategies is developing a model to forecast equity-sector returns and identify corporate defaults. The research director asks an independent model-validation team to review the project before it is implemented in client portfolios. The project combines market prices, accounting variables, macroeconomic releases, and unstructured text extracted from regulatory filings. All records are time stamped, but the validation team must determine whether each time stamp represents the date information became available or merely the date on which it was entered into the research database. One proposed predictor is an aggregate valuation ratio observed monthly. The research team estimates a first-order autoregressive model for the ratio. The estimated lag coefficient exceeds one, and a unit-root test fails to reject its null hypothesis. The team nevertheless uses the level series in predictive regressions, arguing that a high in-sample R-squared demonstrates usefulness. The validation team warns that regressions involving nonstationary variables can produce apparently significant relations that are spurious. It recommends transforming the series appropriately and reassessing stationarity before using it in the forecasting model. For its machine-learning model, Atlas partitions the observations chronologically into training, validation, and test sets. Analysts estimate parameters with the training observations. During model development, however, they repeatedly compare alternative hyperparameter combinations using test-set accuracy and select the combination with the highest result. They then report the same test-set accuracy to prospective clients as an unbiased estimate of out-of-sample performance. The default classifier is trained on a data set in which defaults are rare. A model that classifies almost all issuers as nondefault generates high overall accuracy but identifies few actual defaults. Because failing to identify a default is particularly costly, the validation team focuses on performance measures that separately assess the proportion of predicted defaults that are correct and the proportion of actual defaults that the model identifies. The macroeconomic database creates another concern. Government agencies revise previously released observations, and the research database stores only the latest revised series. Backtests therefore use revised historical values even though portfolio managers would have observed preliminary values at the original forecast dates. Exhibit 1 summarizes the validation findings requiring corrective action.

    • 2. Northstar Analytics develops forecasting and classification models for an asset manager. Its first project examines monthly returns and price levels for a broad commodity index. The estimated models and selected diagnostics are presented in Exhibit 1. The innovations in each model have an estimated mean of zero. For the Return Model, the analyst treats the process as a covariance-stationary AR(1) model if the absolute value of its autoregressive coefficient is less than one. The analyst also checks whether residual autocorrelation remains after estimation. The Ljung–Box test has a null hypothesis that the tested residual autocorrelations are jointly zero. The Price Model produces a high R-squared, but the analyst recognizes that a high goodness-of-fit measure does not establish stationarity. The unit-root test fails to reject its null. Northstar therefore considers whether a transformation is required before using the series in predictive regressions or drawing conventional statistical inferences. The second project predicts corporate defaults using accounting, market, and macroeconomic variables observed monthly from 2012 through 2023. Because predictions will be used prospectively, Northstar proposes training on 2012–2020 data, validating hyperparameters on 2021 data, and reserving 2022–2023 as a final test period. Missing-value imputation and variable standardization must be estimated without using validation or test observations. Another analyst instead proposes randomly mixing all dates and standardizing the variables using the entire sample before splitting the data. The default model's final test-period classification results appear in Exhibit 2. A positive classification denotes a predicted default. The credit team is particularly interested in precision because investigating predicted defaults is costly, although it also monitors recall and overall accuracy. Northstar's governance policy requires that the final test set be evaluated only after model architecture, variables, and hyperparameters have been selected. Repeatedly using test results to modify the model would convert the test sample into another validation sample and overstate genuinely out-of-sample performance.

      • 3. Solstice Research develops forecasts for a technology-sector investment strategy. One analyst models an issuer's monthly revenue growth with an AR(1) specification. The model includes an intercept, and all growth rates are expressed in decimal form. The estimated coefficients and the latest observation appear in Exhibit 1. The analyst also tests for a calendar effect by including a Q4 seasonal dummy variable alongside the AR(1) structure, and separately considers using the issuer's log share-price series in a predictive regression, applying augmented Dickey-Fuller tests to the level and first difference. A data-science team separately builds models to predict next-month stock returns. Candidate predictors include valuation ratios, trading activity, management-language scores, and satellite-derived measures of facility usage. The team estimates a linear regularized model, an unpruned decision tree, and a pruned decision tree. Exhibit 2 reports root mean squared errors from the training sample and a later chronological validation period. Hyperparameters are selected without using the final validation observations. The research director is concerned about model complexity and data leakage. She states that a large reduction in training error is not useful if validation error deteriorates materially. She also requires that every historical prediction use only data that would have been available at the prediction date. For example, an alternative-data vendor sometimes revises historical facility-usage observations after receiving improved satellite classifications. Solstice must use the original release rather than the revised history when testing a strategy. A junior analyst proposes randomly shuffling all monthly observations before splitting the data into training and validation sets. Another proposes selecting variables according to correlations calculated using the entire history and then reporting performance from the same period. The director instead considers a rolling procedure in which models are repeatedly estimated using observations available through each date and tested on the next period. All time-series tests use the significance level specified in Exhibit 1. The return-model comparison uses validation RMSE as the primary measure of out-of-sample predictive accuracy, and lower values are preferred. Each question can be answered independently from the stated estimates and policies.

        • 4. Atlas Systematic Strategies is developing a model to forecast daily returns on an exchange-traded fund and a separate classifier to identify issuers likely to experience financial distress. All observations have reliable event timestamps, but the raw vendor file contains both current security identifiers and historical identifiers. The research director requires the team to recreate the information set that would have existed at each forecast date. Before estimating the return model, the team tests the ETF price level, its first difference, and its daily return for stationarity. Exhibit 1 reports augmented Dickey–Fuller test results using a 5% significance level. The team is not testing for cointegration and intends to use a conventional model requiring stationary input series. An analyst proposes using the ETF price level without transformation because the series contains more intuitive economic information. Another analyst warns that unrelated nonstationary series can produce apparently significant but spurious relationships. The team then divides the return observations chronologically into training, validation, and final test samples. Three candidate models are fitted using identical predictors. Exhibit 2 reports training and validation root mean squared error; lower RMSE indicates better predictive performance. The final test sample has not been examined and will be used only once after the model is selected. The director instructs the team not to select a model based solely on its training error. For the distress project, distress is the positive class. Exhibit 3 presents results from a separate holdout sample. The investment application places particular importance on identifying issuers that actually become distressed, so the team examines recall as well as precision and overall accuracy. The data engineer also reviews controls for look-ahead and survivorship bias. She proposes retaining original release timestamps for alternative data, using security-universe membership as known on each historical date, fitting all scaling parameters only on the training sample, and preserving chronological order during validation. The team agrees that randomly shuffling time-dependent observations or using full-sample preprocessing statistics could transfer future information into model development.

          • 5. Ardent Quantitative Strategies is developing a monthly return-forecasting system. The research team first examines a candidate predictor, y, using an autoregressive model estimated in levels. Exhibit 1 reports the estimated lag coefficient and diagnostic tests. The team uses the Augmented Dickey–Fuller test to assess whether the predictor has a unit root. A failure to reject the test's null hypothesis is interpreted as evidence that the series should not be treated as covariance stationary without an appropriate transformation. After completing the time-series review, the team combines market, accounting, textual-sentiment, and macroeconomic variables. Exhibit 2 summarizes the resulting data-science project. Many of the 120 predictors are highly correlated because several vendors supply related measures of valuation, momentum, and investor sentiment. The portfolio manager believes that each predictor contains potentially useful information and asks the team to retain all predictors while reducing instability in their estimated coefficients. The current model achieves 98% accuracy in the training sample but only 61% accuracy in the validation sample. The team currently creates the validation sample by randomly selecting individual monthly observations across the full 2008–2024 period. A senior researcher objects that this approach can allow later market regimes to influence model choices applied to earlier periods. She proposes a validation design that repeatedly estimates the model using information available through a given date and tests it on subsequent observations. The project also uses macroeconomic series downloaded from a vendor's current database. Historical observations in that database incorporate revisions released months or years after the original announcements. The data do not include vintage dates showing which estimate was publicly available on each historical date. The intended backtest assumes that a portfolio is formed immediately after each original economic release. The chief risk officer asks the team to identify the most appropriate stationarity treatment, validation method, and regularization approach. He also asks it to classify the principal bias created by using revised macroeconomic values in a historical simulation. The model will be used for genuine out-of-sample forecasting, so procedures that merely improve in-sample fit without preserving the information set available at each decision date are unacceptable.

            • 6. Northbridge Investments is developing forecasting models for tactical asset allocation and credit-risk monitoring. The quantitative team first examines a monthly equity-index return series using the autoregressive specification shown in Exhibit 1. The error term has an expected value of zero, and the team needs a one-step-ahead point forecast based only on the most recently observed return. Returns in the model are stated in percentage points, so 1.00% is entered as 1.00 rather than 0.01 when applying the displayed coefficients. The team also studies whether equity price levels and returns are stationary. It applies unit-root tests whose null hypothesis is that the tested series contains a unit root. The price-level test does not reject that null, whereas the return-series test does. The analysts are concerned that regressions involving unrelated nonstationary level series could exhibit apparently significant relationships that are spurious. For a separate machine-learning project, Northbridge combines structured issuer fundamentals, bond-trading information, and timestamped text-derived sentiment variables. The objective is to predict whether an issuer will experience a specified credit event during the following 12 months. Only 2% of the historical observations are credit events. An initial classifier labels every issuer as a non-event, producing 98% overall accuracy despite identifying no events. The team therefore wants evaluation measures that focus directly on the rare positive class. Because the observations are time ordered, the project leader rejects random shuffling of the full data set. The proposed development procedure appears in Exhibit 2. The team will select model specifications and hyperparameters using only the training and validation partitions and will access the final test partition once. Predictors must reflect information actually available at each historical forecast date. For scenario analysis, the team may also generate independent standard normal draws and transform them using a factorization of an estimated positive-definite covariance matrix. It understands that the transformation, rather than the original independent draws, is what imposes the desired cross-asset covariance structure on simulated returns.

              • 7. Aster Peak Investments is developing a monthly asset-allocation model. The research team first analyzes a valuation spread defined as the log earnings yield of an equity index minus a long-term government bond yield. It estimates a first-order autoregressive model for the spread and wants to measure how rapidly a shock decays. The estimated coefficient and relevant significance result are reported in Exhibit 1. The team separately examines an equity index's price level and monthly return series. Augmented Dickey–Fuller tests include the deterministic terms selected by the research policy, and the null hypothesis for each test is that the series has a unit root. The team uses a 5% significance level. The chief investment officer requires stationary inputs unless the modeling method explicitly addresses nonstationarity. For return forecasting, analysts compare linear regression with a random forest. Prediction error is measured by root mean squared error, so lower values indicate better predictive performance. Because investment decisions occur sequentially, the validation method should reproduce the information set that would have existed at each forecast date. The team intends to reserve a final sample for a single unbiased assessment after model choice and hyperparameter tuning. Exhibit 2 describes departures from that intended process. Analysts repeatedly inspected the designated final test sample while selecting tree depth, number of predictors considered at each split, and minimum leaf size. They also reconstructed a historical predictor using financial statements that were restated after the corresponding forecast dates. The original statements were available in the archived database, but they were not used for this predictor. The research director asks whether the random forest's apparent validation advantage is reliable. She notes that model complexity alone does not establish superior out-of-sample performance and that a final test sample ceases to be independent when it influences model selection. Transaction costs and portfolio constraints are outside the scope of this model-comparison exercise.

                • 8. Aster Quantitative Strategies is developing a systematic equity allocation model. The research team first models a monthly market valuation spread using the first-order autoregressive specification in Exhibit 1. The spread and intercept use the same units. The team treats the process as covariance stationary when the absolute value of the autoregressive coefficient is less than one and wants to estimate the level toward which the spread reverts over long horizons. A second team develops a machine-learning model that predicts next-month cross-sectional equity returns. The candidate predictors consist of accounting variables, price and volume measures, analyst language, and news sentiment. All predictors are standardized using parameters estimated within the applicable training sample. Because the number of predictors is large relative to the useful signal, the team considers lasso regression. Its objective function combines prediction error with an L1 penalty on coefficient magnitude. The team is willing to trade some in-sample fit for reduced variance and a more parsimonious model. It does not assume that regularization will correct time-series dependence or poor data quality. For portfolio-risk analysis, Aster generates 20,000 one-year price paths under geometric Brownian motion using a common set of estimated parameters. The team reports the fifth percentile of simulated portfolio returns as a lower-tail threshold. It separately considers calculating the average return among observations below that percentile. The news archive used to construct sentiment scores includes only companies still listed when the archive was extracted. Delisted and failed companies are absent even when their historical news was originally available. The team recognizes that this feature can create survivorship bias and make historical model performance appear stronger than performance obtainable in real time. Exhibit 2 summarizes the simulation, archive, and model-selection procedures.

                  • 9. Summit Systematic Strategies is developing a monthly equity-market forecasting process. Quantitative analyst Noah Reed initially proposes using the logarithm of an equity index's price level as the dependent variable in a conventional regression. Because a nonstationary series can produce misleading significance and spurious relationships, the research director requires Reed to test both the log price level and its first difference. Exhibit 1 reports augmented Dickey–Fuller test results. For these tests, the null hypothesis is that the series has a unit root, and the firm uses a 5% significance level. Reed also estimates a first-order autoregressive model for monthly returns. Returns and the intercept in Exhibit 1 are expressed in decimal form in the model, although the most recent observation is displayed as a percentage. The innovation has a conditional expected value of zero. The director asks for a one-period point forecast based solely on the stated model and most recent return; no simulation adjustment or long-run mean estimate is required. The second phase of the project classifies whether the next month's index return will be positive. Reed considers a random forest and a simpler logistic regression. The available observations are ordered through time, and the model will be used prospectively. Exhibit 2 presents model accuracy and Reed's proposed validation method. The outcome classes are approximately balanced, and identical classification thresholds are used for both models. The random forest's hyperparameters were repeatedly adjusted to improve training accuracy. The director emphasizes that model selection should reflect performance on data unavailable during fitting rather than training accuracy alone. He also requires the validation design to preserve the information set that would have existed at each historical prediction date. Randomly moving future observations into the development sample would not satisfy that requirement. One candidate predictor is a macroeconomic series that is initially published shortly after month-end and subsequently revised. Reed's database contains only the final revised values, which were released two months after each associated prediction date. He proposes using those final values without reconstructing the real-time publication history. All security identifiers remain in the data regardless of whether the issuer later leaves the index, and the positive and negative outcome classes have similar frequencies. The director asks Reed to identify the principal bias created by the proposed macroeconomic feature.

                    Flashcards: Influence analysis: leverage and Cook's distance

                    1. 1. How to correct for heteroskedasticity?

                      Show answer

                      - robust stadard errors (drawback: coefficients may be underestimated) - Generalized least squares

                    2. 2. How to correct for conditional heteroskedasticity of regression residuals?

                      Show answer

                      calculate robust standard errors (White-corrected standard errors, heteroskedasticity-consistent standard errors)

                    3. 3. What is principal component analysis used for?

                      Show answer

                      to identify the factors of a statistical factor model, which cannot necessarily be described using conventional economic variables

                    4. 4. When is using a log-linear model most appropriate?

                      Show answer

                      when a variable grows at a constant rate

                    5. 5. Breusch-pagan test:\ What does it test for?\ What kind of test is it?\ What data is it used for?

                      Show answer

                      conditional heteroskedasticity\ chi-square\ pooled cross-sectional and time series

                    6. 6. What do penalized regression models do?

                      Show answer

                      \- reduce the problem of overfitting by imposing a penalty based on the number of features used by the model\ \- seek to minimize the SSE and the penalty value

                    Everything you need for CFA prep

                    Get full Oncourse access with lessons, practice questions, flashcards and AI study tools.

                    GET STARTED FOR FREE
                    75% OFFLimited time offer
                    GET 75% OFF