Lecture 21 Leverage in Regression

Total Page:16

File Type:pdf, Size:1020Kb

Lecture 21 Leverage in Regression 9/16/2016 CHE384, From Data to Decisions: Measurement, Leverage During Regression Uncertainty, Analysis, and Modeling • During a regression, some data points have Lecture 21 more leverage than others – Leverage points = data with an extreme value Leverage in Regression of the predictor variable (x) Chris A. Mack • Like outliers, high leverage data can have Adjunct Associate Professor outsized influence on the regression results – We’ll define “influence” more exactly later http://www.lithoguru.com/scientist/statistics/ © Chris Mack, 2016Data to Decisions 1 © Chris Mack, 2016Data to Decisions 2 Defining Leverage Defining Leverage • Leverage can be quantified by looking at the distances • For the case of only one predictor variable, between x’s (accounting for correlation) – In the matrix formulation of linear regression, this is given by the diagonal elements of the “hat” matrix H (also called the 1 ̅ 1 1 ̅ projection matrix): , (from Lecture 6) ∑ ̅ 1 , ≡ 0 1 • For two or more predictor variables (multiple regression), we use matrix math to calculate the hat matrix and its Number of diagonal elements parameters Note that so that in the model © Chris Mack, 2016Data to Decisions 3 © Chris Mack, 2016Data to Decisions 4 From the Anscombe Problems Looking at Residuals (recall Lecture 8) • Our model is , , ~ 0, iid • But when we estimate the bk’s with bk’s, the hii = 1 resulting residuals ei do not have a constant variance hii = 0.1 – High leverage points have lower variance © Chris Mack, 2016Data to Decisions 5 © Chris Mack, 2016Data to Decisions 6 1 9/16/2016 Residual Variance From the Anscombe Problems • For ~ 0, , our true residuals have a This residual constant variance , with unbiased has zero variance! estimator 1 The fit always hii = 1 passes exactly through this • But the variance of each fit residual ei is point. h = 0.1 1 ii 1 © Chris Mack, 2016Data to Decisions 7 © Chris Mack, 2016Data to Decisions 8 Studentized Residuals Studentized Residuals • When doing statistical tests on residuals • Internally Studentized Residual: all data are (Grubbs’ test, skewness, etc.) one must included in the calculation studentize the residuals first This distribution is complicated 1 1 • Externally Studentized Residual: the ith data point Called “internally studentized residual” or “standardized residual” is excluded from the calculation of se Also called • Since the SE of the residual varies, tests t-distributed with 1 “studentized DF = n – p – 1 should always be done on the studentized deleted residual” [for e ~ N(0,s )] residuals, not the raw residuals e © Chris Mack, 2016Data to Decisions 9 © Chris Mack, 2016Data to Decisions 10 Testing the Residuals Williams Graph • To see the possibility for both outliers and high-leverage • Perform statistical tests on the esr data, plot the externally studentized residual (esr) versus (externally studentized residuals) only the normalized leverage (/) for each data point – QQ Plots Potential Outliers – Moment testing Grubbs Critical T – Outlier detection/rejection (Grubbs, etc.) High |esr| – More to come … leverage • This is because the esr has a simple sampling distribution: Student’s t Twice the average leverage © Chris Mack, 2016Data to Decisions 11 © Chris Mack, 2016Data to Decisions 12 2 9/16/2016 Lecture 21: What have we learned? • Define leverage • What is the role of the hat matrix in determining leverage? • What is the difference between internally and externally studentized residuals? • How should residuals be studentized for statistical testing? • Know how to create and interpret the Williams Graph © Chris Mack, 2016Data to Decisions 13 3.
Recommended publications
  • Chapter 4: Model Adequacy Checking
    Chapter 4: Model Adequacy Checking In this chapter, we discuss some introductory aspect of model adequacy checking, including: • Residual Analysis, • Residual plots, • Detection and treatment of outliers, • The PRESS statistic • Testing for lack of fit. The major assumptions that we have made in regression analysis are: • The relationship between the response Y and the regressors is linear, at least approximately. • The error term ε has zero mean. • The error term ε has constant varianceσ 2 . • The errors are uncorrelated. • The errors are normally distributed. Assumptions 4 and 5 together imply that the errors are independent. Recall that assumption 5 is required for hypothesis testing and interval estimation. Residual Analysis: The residuals , , , have the following important properties: e1 e2 L en (a) The mean of is 0. ei (b) The estimate of population variance computed from the n residuals is: n n 2 2 ∑()ei−e ∑ei ) 2 = i=1 = i=1 = SS Re s = σ n − p n − p n − p MS Re s (c) Since the sum of is zero, they are not independent. However, if the number of ei residuals ( n ) is large relative to the number of parameters ( p ), the dependency effect can be ignored in an analysis of residuals. Standardized Residual: The quantity = ei ,i = 1,2, , n , is called d i L MS Re s standardized residual. The standardized residuals have mean zero and approximately unit variance. A large standardized residual ( > 3 ) potentially indicates an outlier. d i Recall that e = (I − H )Y = (I − H )(X β + ε )= (I − H )ε Therefore, / Var()e = var[]()I − H ε = (I − H )var(ε )(I −H ) = σ 2 ()I − H .
    [Show full text]
  • LSAR: Efficient Leverage Score Sampling Algorithm for the Analysis
    LSAR: Efficient Leverage Score Sampling Algorithm for the Analysis of Big Time Series Data Ali Eshragh∗ Fred Roostay Asef Nazariz Michael W. Mahoneyx December 30, 2019 Abstract We apply methods from randomized numerical linear algebra (RandNLA) to de- velop improved algorithms for the analysis of large-scale time series data. We first develop a new fast algorithm to estimate the leverage scores of an autoregressive (AR) model in big data regimes. We show that the accuracy of approximations lies within (1 + O (")) of the true leverage scores with high probability. These theoretical results are subsequently exploited to develop an efficient algorithm, called LSAR, for fitting an appropriate AR model to big time series data. Our proposed algorithm is guaranteed, with high probability, to find the maximum likelihood estimates of the parameters of the underlying true AR model and has a worst case running time that significantly im- proves those of the state-of-the-art alternatives in big data regimes. Empirical results on large-scale synthetic as well as real data highly support the theoretical results and reveal the efficacy of this new approach. 1 Introduction A time series is a collection of random variables indexed according to the order in which they are observed in time. The main objective of time series analysis is to develop a statistical model to forecast the future behavior of the system. At a high level, the main approaches for this include the ones based on considering the data in its original time domain and arXiv:1911.12321v2 [stat.ME] 26 Dec 2019 those arising from analyzing the data in the corresponding frequency domain [31, Chapter 1].
    [Show full text]
  • Outlier Detection and Influence Diagnostics in Network Meta- Analysis
    Outlier detection and influence diagnostics in network meta- analysis Hisashi Noma, PhD* Department of Data Science, The Institute of Statistical Mathematics, Tokyo, Japan ORCID: http://orcid.org/0000-0002-2520-9949 Masahiko Gosho, PhD Department of Biostatistics, Faculty of Medicine, University of Tsukuba, Tsukuba, Japan Ryota Ishii, MS Biostatistics Unit, Clinical and Translational Research Center, Keio University Hospital, Tokyo, Japan Koji Oba, PhD Interfaculty Initiative in Information Studies, Graduate School of Interdisciplinary Information Studies, The University of Tokyo, Tokyo, Japan Toshi A. Furukawa, MD, PhD Departments of Health Promotion and Human Behavior, Kyoto University Graduate School of Medicine/School of Public Health, Kyoto, Japan *Corresponding author: Hisashi Noma Department of Data Science, The Institute of Statistical Mathematics 10-3 Midori-cho, Tachikawa, Tokyo 190-8562, Japan TEL: +81-50-5533-8440 e-mail: [email protected] Abstract Network meta-analysis has been gaining prominence as an evidence synthesis method that enables the comprehensive synthesis and simultaneous comparison of multiple treatments. In many network meta-analyses, some of the constituent studies may have markedly different characteristics from the others, and may be influential enough to change the overall results. The inclusion of these “outlying” studies might lead to biases, yielding misleading results. In this article, we propose effective methods for detecting outlying and influential studies in a frequentist framework. In particular, we propose suitable influence measures for network meta-analysis models that involve missing outcomes and adjust the degree of freedoms appropriately. We propose three influential measures by a leave-one-trial-out cross-validation scheme: (1) comparison-specific studentized residual, (2) relative change measure for covariance matrix of the comparative effectiveness parameters, (3) relative change measure for heterogeneity covariance matrix.
    [Show full text]
  • Residuals, Part II
    Biostatistics 650 Mon, November 5 2001 Residuals, Part II Key terms External Studentization Outliers Added Variable Plot — Partial Regression Plot Partial Residual Plot — Component Plus Residual Plot Key ideas/results ¢ 1. An external estimate of ¡ comes from refitting the model without observation . Amazingly, it has an easy formula: £ ¦!¦ ¦ £¥¤§¦©¨ "# 2. Externally Studentized Residuals $ ¦ ¦©¨ ¦!¦)( £¥¤§¦&% ' Ordinary residuals standardized with £*¤§¦ . Also known as R-Student. 3. Residual Taxonomy Names Definition Distribution ¦!¦ ¦+¨-,¥¦ ,0¦ 1 Ordinary ¡ 5 /. &243 ¦768¤§¦©¨ ¦ ¦!¦ 1 ¦!¦ PRESS ¡ &243 9' 5 $ Studentized ¦©¨ ¦ £ ¦!¦ ¤0> % = Internally Studentized : ;<; $ $ Externally Studentized ¦+¨ ¦ £?¤§¦ ¦!¦ ¤0>¤A@ % R-Student = 4. Outliers are unusually large observations, due to an unmodeled shift or an (unmodeled) increase in variance. 5. Outliers are not necessarily bad points; they simply are not consistent with your model. They may posses valuable information about the inadequacies of your model. 1 PRESS Residuals & Studentized Residuals Recall that the PRESS residual has a easy computation form ¦ ¦©¨ PRESS ¦!¦ ( ¦!¦ It’s easy to show that this has variance ¡ , and hence a standardized PRESS residual is 9 ¦ ¦ ¦!¦ ¦ PRESS ¨ ¨ ¨ ¦ : £ ¦!¦ £ ¦!¦ £ ¦ ¦ % % % ' When we standardize a PRESS residual we get the studentized residual! This is very informa- ,¥¦ ¦ tive. We understand the PRESS residual to be the residual at ¦ if we had omitted from the 3 model. However, after adjusting for it’s variance, we get the same thing as a studentized residual. Hence the standardized residual can be interpreted as a standardized PRESS residual. Internal vs External Studentization ,*¦ ¦ The PRESS residuals remove the impact of point ¦ on the fit at . But the studentized 3 ¢ ¦ ¨ ¦ £?% ¦!¦ £ residual : can be corrupted by point by way of ; a large outlier will inflate the residual mean square, and hence £ .
    [Show full text]
  • Chapter 39 Fit Analyses
    Chapter 39 Fit Analyses Chapter Table of Contents STATISTICAL MODELS ............................568 LINEAR MODELS ...............................569 GENERALIZED LINEAR MODELS .....................572 The Exponential Family of Distributions ....................572 LinkFunction..................................573 The Likelihood Function and Maximum-Likelihood Estimation . .....574 ScaleParameter.................................576 Goodness of Fit .................................576 Quasi-Likelihood Functions ..........................577 NONPARAMETRIC SMOOTHERS ......................580 SmootherDegreesofFreedom.........................581 SmootherGeneralizedCrossValidation....................582 VARIABLES ...................................583 METHOD .....................................585 OUTPUT .....................................587 TABLES ......................................590 ModelInformation...............................590 ModelEquation.................................590 X’X Matrix . .................................591 SummaryofFitforLinearModels.......................592 SummaryofFitforGeneralizedLinearModels................593 AnalysisofVarianceforLinearModels....................594 AnalysisofDevianceforGeneralizedLinearModels.............595 TypeITests...................................595 TypeIIITests..................................597 ParameterEstimatesforLinearModels....................599 ParameterEstimatesforGeneralizedLinearModels..............601 C.I.forParameters...............................602 Collinearity
    [Show full text]
  • Remedies for Assumption Violations and Multicollinearity Outliers • If the Outlier Is Due to a Data Entry Error, Just Correct the Value
    Newsom Psy 522/622 Multiple Regression and Multivariate Quantitative Methods, Winter 2021 1 Remedies for Assumption Violations and Multicollinearity Outliers • If the outlier is due to a data entry error, just correct the value. This is a good reason why raw data should be retained for many years after it is collected as some professional associations recommend. With direct computer entry during interviews, entry errors cannot always be determined for certain. • If the outlier is due to an invalid case because the protocol was not followed or the inclusion criteria was incorrectly applied for that case, the researcher may be able to just eliminate that case. I recommend at least reporting the number of cases excluded and the reason. Consider analyzing the data and/or reporting analyses with and without the deleted case(s). • Transformation of the data might be considered (see overhead on transformations). Square root transformations, for instance, bring outlying cases closer to the others. Transformations, however, can make results difficult to interpret sometimes. • Analyze the data with and without the outlier(s). If the implications of the results do not differ, one could simply state that the analyses were conducted with and without the outlier(s) and that the results do not differ substantially. If they do differ, both results could be presented and a discussion about the potential causes of the outlier(s) could be discussed (e.g., different subgroup of cases, potential moderator effect). • An alternative estimation method could be used, such as least absolute residuals, weighted least squares, bootstrapping, or jackknifing. See discussion of these below.
    [Show full text]
  • Linear Regression Diagnostics*
    LIBRARY OF THE MASSACHUSETTS INSTITUTE OF TECHNOLOGY WORKING PAPER ALFRED P. SLOAN SCHOOL OF MANAGEMENT LINEAR REGRESSION DIAGNOSTICS* Soy E. Welsch and Edwin Kuh Massachusetts Institute of Technology and NBER Computer Research Center WP 923-77 April 1977 MASSACHUSETTS INSTITUTE OF TECHNOLOGY 50 MEMORIAL DRIVE CAMBRIDGE, MASSACHUSETTS 02139 ^ou to divest? access to expanded sub-regional markets possibility of royalty payments to parent access to local long term capital advantages given to a SAICA (i.e., reduce LINEAR REGRESSION DIAGNOSTICS^ Roy E. Welsch and Edwin Kuh Massachusetts Institute of Technology and NBER Computer Research Center WP 923-77 April 1977 *Me are indebted to the National Science Foundation for supporting this research under Grant SOC76-143II to the NBER Computer Research Center. - , ABSTFACT This paper atxeT.pts to provide the user of linear multiple regression with a batter;/ of iiagncstic tools to determine which, if any, data points have high leverage or irifluerice on the estimation process and how these pcssidly iiscrepar.t iata points -differ from the patterns set by the majority of the data. Tr.e point of viev; taken is that when diagnostics indicate the presence of anomolous data, the choice is open as to whether these data are in fact -unus-ual and helprul, or possioly hannful and thus in need of modifica- tions or deletion. The methodology/ developed depends on differences, derivatives, and decompositions of basic re:gressicn statistics. Th.ere is also a discussion of hov; these tecr-niques can be used with robust and ridge estimators, r^i exarripls is given showing the use of diagnostic methods in the estimation of a cross cou.ntr>' savir.gs rate model.
    [Show full text]
  • Studentized Residuals
    CHECKING ASSUMPTIONS/CONDITIONS AND FIXING PROBLEMS Recall, linear model is: YXiii01 where we assume: E{ε} = 0, Variance of the “errors” = σ2{ε} = σ2, same value at any X Sometimes assume errors are normally distributed (“normal errors” model). ˆ After we fit the model using data, the residuals eYYiii will be useful for checking the assumptions and conditions. But what is a large residual? If discussing GPA, 0.5 could be large but if discussion SAT scores (possible scores of 200 to 800), 0.5 would be tiny. Need to create equivalent of a z-score. Recall estimate of σ is sMSE * e i e i “Semi-studentized” residuals (p. 103) MSE Note these are called standardized residuals in R. Later, will learn another version, which R calls studentized residuals. Assumptions in the Normal Linear Regression Model A1: There is a linear relationship between X and Y. A2: The error terms (and thus the Y’s at each X) have constant variance. A3: The error terms are independent. A4: The error terms (and thus the Y’s at each X) are normally distributed. Note: In practice, we are looking for a fairly symmetric distribution with no major outliers. Other things to check (Questions to ask): Q5: Are there any major outliers in the data (X, or combination of (X,Y))? Q6: Are there other possible predictors that should be included in the model? Applet for illustrating the effect of outliers on the regression line and correlation: http://illuminations.nctm.org/LessonDetail.aspx?ID=L455 Useful Plots for Checking Assumptions and Answering These Questions Reminders: ˆ Residual
    [Show full text]
  • Leveraging for Big Data Regression
    Focus Article Leveraging for big data regression Ping Ma∗ and Xiaoxiao Sun Rapid advance in science and technology in the past decade brings an extraordinary amount of data, offering researchers an unprecedented opportunity to tackle complex research challenges. The opportunity, however, has not yet been fully utilized, because effective and efficient statistical tools for analyzing super-large dataset are still lacking. One major challenge is that the advance of computing resources still lags far behind the exponential growth of database. To facilitate scientific discoveries using current computing resources, one may use an emerging family of statistical methods, called leveraging. Leveraging methods are designed under a subsampling framework, in which one samples a small proportion of the data (subsample) from the full sample, and then performs intended computations for the full sample using the small subsample as a surrogate. The key of the success of the leveraging methods is to construct nonuniform sampling probabilities so that influential data points are sampled with high probabilities. These methods stand as the very unique development of their type in big data analytics and allow pervasive access to massive amounts of information without resorting to high performance computing and cloud computing. © 2014 Wiley Periodicals, Inc. Howtocitethisarticle: WIREs Comput Stat 2014. doi: 10.1002/wics.1324 Keywords: big data; subsampling; estimation; least squares; leverage INTRODUCTION of FPGA (field-programmable gate array)-based accel- erators are ongoing in both academia and industry apid advance in science and technology in the (for example, with TimeLogic and Convey Comput- past decade brings an extraordinary amount R ers). However, none of these technologies by them- of data that were inaccessible just a decade ago, selves can address the big data problem accurately and offering researchers an unprecedented opportunity to at scale.
    [Show full text]
  • Elemental Estimates, Influence, and Algorithmic Leveraging
    Leverage in penalized least squares estimation Keith Knight University of Toronto [email protected] Abstract The German mathematician Carl Gustav Jacobi showed in 1841 that least squares estimates can be written as an expected value of elemental estimates with respect to a probability measure on subsets of the predictors; this result is trivial to extend to penalized least squares where the penalty is quadratic. This representation is used to define the leverage of a subset of observations in terms of this probability measure. This definition can be applied to define the influence of the penalty term on the estimates. Applications to the Hodrick-Prescott filter, backfitting, and ridge regression as well as extensions to non-quadratic penalties are considered. 1 Introduction We consider estimation in the linear regression model Y = xT β + ε (i =1, , n) i i i ··· where β is a vector of p unknown parameters. Given observations (x ,y ): i = 1, , n , we define the penalized least squares (PLS) { i i ··· } estimate β as the minimizer of n (y xT β)2 + βT Aβ. (1) i − i i=1 where A is a non-negative definite matrix with A = LT L for some r p matrix L. Note that L × is in general not uniquely specified since for any r r orthogonal matrix O, A =(OL)T (OL). × In the context of this paper, we would typically choose L so that its rows are interpretable in some sense. Examples of PLS estimates include ridge estimates (Hoerl and Kennard, 1970), smoothing splines (Craven and Wahba, 1978), the Hodrick-Prescott filter (Hodrick and Prescott, 1997), and (trivially when A = 0) ordinary least squares (OLS) estimates.
    [Show full text]
  • Cal Analysis of Residual Scores and Outlier Detection in Bivariate Least Squares Regression Analysis
    DOCUMENT RESUME ED 395 949 TM 025 016 AUTHOR Serdahl, Eric TITLE An Introduction to Grapl- cal Analysis of Residual Scores and Outlier Detection in Bivariate Least Squares Regression Analysis. PUB DATE Jan 96 NOTE 29p.; Paper presented at the Annual Meeting of the Southwest Educational Research Association (New Orleans, LA, January 1996). PUB TYPE Reports Evaluative/Feasibility (142) Speeches/Conference Papers (150) EDRS PRICE MF01/PCO2 Plus Postage. DESCRIPTORS *Graphs; *Identification; *Least Squares Statistics; *Regression (Statistics) ;Research Methodology IDENTIFIERS *Outliers; *Residual Scores; Statistical Package for the Social Sciences PC ABSTRACT The information that is gained through various analyses of the residual scores yielded by the least squares regression model is explored. In fact, the most widely used methods for detecting data that do not fit this model are based on an analysis of residual scores. First, graphical methods of residual analysis are discussed, followed by a review of several quantitative approaches. Only the more widely used approaches are discussed. Example data sets are analyzed through the use of the Statistical Package for the Social Sciences (personal computer version) to illustrate the various strengths and weaknesses of these approaches and to demonstrate the necessity of using a variety of techniques in combination to detect outliers. The underlying premise for using these techniques is that the researcher needs to make sure that conclusions based on the data are not solely dependent on one or two extreme observations. Once an outlier is detected, the researcher must examine the data point's source of aberration. (Contains 3. figures, 5 tables, and 14 references.) (SLD) * Reproductions supplied by EDRS are the best that can be made from the original document.
    [Show full text]
  • Leverage (Statistics)
    Leverage (statistics) In statistics and in particular in regression analysis, leverage is a measure of how far away the independent variable values of an observation are from those of the other observations. High-leverage points are those observations, if any, made at extreme or outlying values of the independent variables such that the lack of neighboring observations means that the fitted regression model will pass close to that particular observation.[1] Modern computer packages for statistical analysis include, as part of their facilities for regression analysis, various quantitative measures for identifying influential observations: among these measures is partial leverage, a measure of how a variable contributes to the leverage of a datum. Contents Linear regression model Definition Bounds on leverage Proof Effect on residual variance Proof Studentized residuals See also References Linear regression model Definition In the linear regression model, the leverage score for thei -th data unit is defined as: the i-th diagonal element of the projection matrix , where is the design matrix. The leverage score is also known as the observation self-sensitivity or self-influence,[2] as shown by where and are the fitted and measured observation, respectively. Bounds on leverage Proof First, note that H is an idempotent matrix: Also, observe that is symmetric. So equating theii element of H to that of H 2, we have and Effect on residual variance If we are in an ordinary least squares setting with fixed X, regression errors and then where (the i th regression residual). In other words, if the model errors are homoscedastic, an observation's leverage score determines the degree of noise in the model's misprediction of that observation.
    [Show full text]