Scatterplot for Cedar Tree Example

Size: px
Start display at page:

Download "Scatterplot for Cedar Tree Example"

Transcription

1 Transformations: I Forbes happily had a physical argument to justify linear model E(log (pressure) boiling point) = boiling point usual (not so happy) situation: parametric model behind MLR is convenient approximation at best All models are wrong but some are useful. (Box, 1979) transformations allow MLR models to be extended to data that, in their original state, are poorly approximated by linear models in SLR case, idea is to get transformation e Y of response Y and/or transformation e X of regressor X such that E( e Y e X = x) x ALR 185 VIII 1

2 Transformations: II while transformations are a favorite tool of statisticians, their use is not without controversy (arises in the physical sciences) picking suitable transformations is part science and part art focusing on SLR to start with, need for transformation is manifested in nonlinear appearance of scatterplot let s look at two examples from Weisberg: height of cedar trees (response) versus diameter at 4.5 feet above the ground (regressor) see Figure 8.3 (p. 190) surface tension of liquid copper (response) versus dissolved sulfur (regressor) see Problem 8.1 (pp ) ALR 189, 190, 199, 200 VIII 2

3 Height (dm) Scatterplot for Cedar Tree Example Dbh (mm) ALR 189, 190 VIII 3

4 Tension (dynes/cm) Scatterplot for Liquid Copper Example Sulfur (% of weight) ALR 199, 200 VIII 4

5 Transforming One Regressor: I assuming regressor is positive (true for two examples), widely used family of transformations is scaled power transformations: ( (X 1)/, 6= 0 S(X, ) = log(x), = 0 rationale for 1 and division by for 6= 0 is in part tied to definition for = 0 choice: can show that by making use of lim!0 X 1 = log(x) X 1 = e log(x) 1 along with e z = 1 + z + z2 2! + z3 3! + ALR 189 VIII 5

6 Transforming One Regressor: II for = 0, E(Y X = x) = log(x), whereas, for 6= 0, E(Y X = x) = x 1 where 0 = 0 1 and 1 = 1 = x = x, in practice unscaled power transformation achieves same e ect: ( X, 6= 0 (X, ) = log(x), = 0 choice note: (X, ) has opposite sign from S (X, ) when < 0 = 1 is essentially no transformation ALR 189, 186 VIII 6

7 Transforming One Regressor: III idea is to find such that we approximately have E(Y X = x) = S (x, ) given data (x i, y i ), consider residual sum of squares function: nx RSS(b 0, b 1, ) = [y i (b 0 + b 1 S (x i, ))] 2 i=1 for fixed, minimizer of above is OLS estimators ˆ0 and ˆ1 from regression of y i on S (x i, ), resulting in RSS( ) = RSS( ˆ0, ˆ1, ) ALR 189 VIII 7

8 idea: select Transforming One Regressor: IV such that RSS( ) is minimized over in theory, need nonlinear optimizer to find best, but, since we really don t need to know precisely, can often make do with restricted grid search using, e.g., n o 2 2, 1, 1 2, 1 3, 0, 1 3, 1 2, 1, 2 returning to cedar tree example, following scatterplots show Height versus (Dbh, ) along with fitted regression line for above 9 choices of ALR 189 VIII 8

9 Height (dm) Scatterplot of Height versus (Dbh, ) with = S (Dbh, ) ALR 191 VIII 9

10 RSS( ) Plot of RSS( ) versus VIII 10

11 Transforming One Regressor: V alternative way of displaying transform regress y i = Height i on x i = (Dbh i, ), i = 1,..., n, where x i is transformed value of x i = Dbh i find min & max values Dbh min & Dbh max of Dbh i form dense grid of values x j, j = 1,..., m, ranging from Dbh min to Dbh max compute predicted values yj corresponding to (x j, ) plot y j versus x j on original scatterplot of y i versus x i ALR 189, 190 VIII 11

12 Height (dm) Scatterplot of Height versus Dbh with = Dbh (mm) ALR 190 VIII 12

13 Height (dm) Scatterplot of Height versus Dbh, = 1, 0, Dbh (mm) ALR 190 VIII 13

14 Height Plot Created by R Function invtranplot ^: Dbh ALR 190 VIII 14

15 Tension Scatterplot for Liquid Copper Example ^: Sulfur ALR 199, 200 VIII 15

16 Transforming Response: I assuming regressor X has been suitably transformed into e X, now consider transforming response Y will consider two methods, the first of which is based on model E(Ŷ Y = y) = S (y, ), where Ŷ is fitted value from regression of Y on e X recall that Ŷ is a linear transformation of e X (note: need to assume Y > 0) model is analogous to E(Y X = x) = S (x, ), so the idea is to use same procedure as we did for selecting e X leads to creation of inverse fitted value plot of Ŷ versus Y (also called an inverse response plot) let s look at three examples (using e X = log(x) for first two) ALR 196, 197 VIII 16

17 Fitted height Inverse Fitted Value Plot for Cedar Tree Example ^: Height VIII 17

18 Fitted tension Inverse Fitted Value Plot for Liquid Copper Example ^: Tension VIII 18

19 Fitted pressure Inverse Fitted Value Plot for Forbes Example ^: Pressure VIII 19

20 Transforming Response: II 2nd method (called Box Cox method) makes use of family of modified power transformations (note: again we need Y > 0): ( M(Y, ) = gm(y ) 1 gm(y ) 1 (Y 1)/, 6= 0 S (Y, ) = gm(y ) 1 log(y ), = 0, where gm(y ) is geometric mean of untransformed responses y 1,..., y n : 0 11/n 0 1 ny gm(y ) y i A = 1 nx log(y n i ) A i=1 i=1 2nd form is computationally preferable on a computer so: what is the rationale for multiplying by geometric mean? ALR 198, 190, 191 VIII 20

21 Transforming Response: III residual sum of squares function when transforming predictor: nx RSS p,s (b 0, b 1, ) = [y i (b 0 + b 1 S (x i, ))] 2 i=1 for each, measures how well we predict y i s residual sum of squares function when transforming response: nx RSS r,s (b 0, b 1, ) = [ S (y i, ) (b 0 + b 1 x i )] 2 for each i=1, measures how well we predict S (y i, ) s units of S (y i, ) change as changes, leading to concerns about comparing apples & oranges (because b 1 changes units implicitly, not a concern with RSS p,s (b 0, b 1, )) ALR 190, 191 VIII 21

22 Transforming Response: IV when 6= 0, have M(Y, ) = 20 6 ny 4@ i=1 Y i 11/n A Y 1 if Y has units of m (meters), then Q n i=1 Y i has units of m n ( Q n i=1 Y i ) 1/n has units of m; [( Q n i=1 Y i ) 1/n ] 1, units of m 1 Y has units of m, so M (Y, ) has units of m for all thus: transformed & untransformed responses have same units ALR 190, 191 VIII 22

23 Transforming Response: V resulting residual sum of squares function, i.e., nx RSS r,m (b 0, b 1, ) = [ M (y i, ) (b 0 + b 1 x i )] 2, i=1 measured in same units for all oranges concern, thus eliminating apples and for fixed, minimizer of above is OLS estimators ˆ0 and ˆ1 from regression of M (y i, ) on x i, resulting in as before, select RSS r,m ( ) = RSS r,m ( ˆ0, ˆ1, ) such that RSS r,m ( ) is minimized over let s consider same three examples again (using e X = log(x) for first two) ALR 198, 190, 191 VIII 23

24 Height (dm) Scatterplot for Cedar Tree Example = 0.6 = 1 = 0 = log(dbh) VIII 24

25 Tension Scatterplot for Liquid Copper Example = 0.7 = 1 = 0 = log(sulfur) VIII 25

26 Pressure Scatterplot for Forbes Example = 0.4 = 1 = 0 = Boiling point VIII 26

27 Transforming Response: VI display of transforms done as follows: regress ỹ i = M (y i, ) on x i, i = 1,..., n find min & max values x min & x max of x i form dense grid of values x j, j = 1,..., m, ranging from x min to x max compute predicted values ỹj over dense grid plot M 1 (ỹ j, ) versus x j 1 M (Y, ) = on original scatterplot, where ( (1 + Y /gm(y ) 1 ) 1/, 6= 0 exp(y /gm(y )), = 0 (note that 1 M ( M(Y, ), ) = Y ) VIII 27

28 Summary of Regressor and Response Transforms here is a table showing s chosen so far response Example regressor 1st method 2nd method Cedar tree Liquid copper Forbes s chosen by two methods for transforming response disagree for cedar tree example, but agree for other two examples following plots for = 0, 0.2, 0.6 and 1 for cedar tree example suggest that using = 0 or 0.2 impart some curvature, whereas = 0.6 or 1 (i.e., no transformation) do not going with no transformation is a simple (& reasonable) choice VIII 28

29 log(height) = 0 Transformation with Linear & Quadratic Fits log(dbh) VIII 29

30 Height = 0.2 Transformation with Linear & Quadratic Fits log(dbh) VIII 30

31 Height = 0.6 Transformation with Linear & Quadratic Fits log(dbh) VIII 31

32 Height (dm) = 1 Transformation with Linear & Quadratic Fits log(dbh) ALR 191 VIII 32

33 Transformations for Multiple Regressors: I focusing now on MLR, overall goal is to find transformations in which MLR matches the data to a reasonable approximation (Weisberg, p. 193) theoretical arguments (Weisberg, pp ) suggest we can make progress towards this goal if regressors in mean function are all linearly related if, through suitable transformations, we arrive at regressors X e that are approximately pairwise linear, theoretical arguments say that, under certain conditions (some restrictive!), fitting mean function E(Y X e = x) = 0 x using OLS allows us to identify unknown function g( ) in more general model E(Y e X = x) = g( 0 x) from a scatterplot of y i versus fitted values ˆ0 x i ALR 193, 194 VIII 33

34 Transformations for Multiple Regressors: II overall strategy is thus: 1. transform regressors so that all pairwise scatterplots are approximately linear (don t worry about scatterplots of Y versus individual regressors) 2. regress Y on transformed regressors e X to get estimates ˆ 3. determine a suitable transform for Y using one of two methods discussed previously (see VIII 16 and VIII 20), leading to MLR model E( (Y, ) e X = x) = 0 x starting point in achieving 1 is study of scatterplot matrix quickly leads to realization that achieving 1 can be daunting! Weisberg ( 8.2) uses Highway data as an illustration ALR 194, 195, 191 VIII 34

35 Transformations for Multiple Regressors: III goal is to predict response rate (accidents per million vehicle miles for a particular highway segment) using as regressors len, length of highway segment in miles adt, average daily tra c count in thousands trks, truck volume as % of total volume slim, speed limit shld, shoulder width of outer shoulder on roadway sigs, number of interchanges with signals per mile ALR 192 VIII 35

36 Scatterplot Matrix for Untransformed Highway Data len adt trks slim shld sigs ALR 193 VIII 36

37 Enhanced Scatterplot Matrix len adt trks slim shld sigs ALR 193 VIII 37

38 Enhanced Matrix for Selected Regressors: I len adt trks ALR 193 VIII 38

39 Enhanced Matrix for Selected Regressors: II len slim shld sigs ALR 193 VIII 39

40 Enhanced Matrix for Selected Regressors: III adt slim shld sigs ALR 193 VIII 40

41 Enhanced Matrix for Selected Regressors: IV trks slim shld sigs ALR 193 VIII 41

42 Transformations for Multiple Regressors: IV all regressors positive except sigs (# of signaled interchanges per mile), which has some values equal to zero can handle sigs by defining new regressor sigs len + 1 sigs1 = len (i.e., bump up signal count by 1 in every segment) slim (speed limit) doesn t vary much (most values between 50 to 60 mph, with total range being between 40 and 70 mph) unlikely any transformation (slim, ) will be e ective with sigs replaced by sigs1 and with slim left out as a candidate for transformation, can use R function powertransform to get initial guesses at suitable transformations (implementation of multivariate extension of Box Cox due to Velilla) ALR 192, 195, 196 VIII 42

43 Transformations for Multiple Regressors: V output from powertransform for Highway data: Est.Power Std.Err. Lower Bound Upper Bound len adt trks shld sigs Likelihood ratio tests about transformation parameters LRT df pval LR test, lambda = ( ) LR test, lambda = ( ) LR test, lambda = ( ) ALR 196 VIII 43

44 Transformations for Multiple Regressors: VI can reject null hypothesis of all log transformations and null hypothesis of no transformations at all cannot reject null hypothesis of log transformation for all regressors except shld (shoulder width) suggestion for trks is a bit odd: sticking to nearest integer would lead to choice = 1 rather than = 0 can test feasibility of this modification using testtransform, which yields following output for comparison with = 0 choice: LRT df pval LR test, lambda = ( ) LR test, lambda = ( ) cannot reject either of two stated null hypotheses, so will go with suggested (0, 0, 0, 1, 0) choice for s ALR 196 VIII 44

45 Scatterplot Matrix for Transformed Highway Data loglen logadt logtrks slim shld logsigs ALR 197 VIII 45

46 Enhanced Scatterplot Matrix loglen logadt logtrks slim shld logsigs ALR 197 VIII 46

47 Enhanced Matrix for Selected Regressors: I loglen logadt logtrks ALR 193 VIII 47

48 Enhanced Matrix for Selected Regressors: II loglen slim shld logsigs ALR 193 VIII 48

49 Enhanced Matrix for Selected Regressors: III logadt slim shld logsigs ALR 193 VIII 49

50 Enhanced Matrix for Selected Regressors: IV logtrks slim shld logsigs ALR 193 VIII 50

51 Transforming Response for Highway Data: I with transformations for regressors set, turn attention now to transformation of response using 1. inverse fitted value plot 2. Box Cox method for 1, start by fitting model E(rate X) = loglen + 2 logadt + 3 logtrks + 4 slim + 5 shld + 6 logsigs1 to obtain fitted values Ŷ for rate fit model E(Ŷ Y = y) = S (y, ) for various choices of to create inverse fitted value plot following plot suggests log transform might be appropriate ALR 196 VIII 51

52 Fitted rate Inverse Fitted Value Plot for Highway Example ^: rate ALR 197 VIII 52

53 Transforming Response for Highway Data: II for 2 (Box Cox method), consider residual sum of squares function nx RSS r,m (b, ) = M(y i, ) x 0 i b 2, i=1 where y i is rate for ith case, and vector x i contains 1 followed by values of loglen, logadt,..., logsigs1 for ith case for fixed, minimizer of above is OLS estimator ˆ from regression of M (y i, ) on x i, resulting in as before, select RSS r,m ( ) = RSS r,m ( ˆ, ) such that RSS r,m ( ) is minimized over following summary plot shows so-called log-likelihood versus, where log-likelihood is n 2 log[rss r,m ( )/n] (suggests log transform as did inverse fitted value plot) ALR 198 VIII 53

54 log Likelihood Summary of Box Cox Method for Highway Example 95% ALR 197 VIII 54

55 Main Points: I transformations allow application of SLR and MLR analysis to regressor/response data that, in their original state, are not well-suited for such analysis in SLR, need for transformation suggested by scatterplot of Y versus X with points that aren t clustered about a line useful family of transformations is scaled power transformations: ( (X 1)/, 6= 0 S(X, ) = log(x), = 0 (case = 1 is essentially no transformation at all) above requires that regressor X be positive ( 8.4 of Weisberg discusses a (not entirely satisfactory) modification for handling data that can take both positive and negative values) ALR 185, 189, 198, 199 VIII 55

56 Main Points: II appropriate is value minimizing residual sum of squares (RSS) of Y regressed on S (X, ) once X has been suitably transformed, can use either 1. inverse fitted value plot or 2. Box Cox method to select a power transformation suitable for Y > 0 (2nd method makes use of a modified power transformation, which di ers from a scaled power transformation by a normalizing factor involving the geometric mean of responses y i ) ALR 189, 196, 198 VIII 56

57 Main Points: III in MLR, good to have regressors whose entries in scatterplot matrix show a linear relationship if original regressors don t have this pattern, transformation of one or more regressors is called for identifying which transformation to apply to which regressor can be a daunting task task can be facilitated by an automatic transformation selection method due to Velilla, which can provide a useful starting point for picking suitable transformations (part art/part science!) ALR 193, 194, 195 VIII 57

58 Additional Reference G.E.P. Box (1979), Robustness in the Strategy of Scientific Model Building, in Robustness in Statistics, edited by R.L. Launer and G.N. Wilkinson, New York: Academic Press, pp VIII 58

1 Introduction 1. 2 The Multiple Regression Model 1

1 Introduction 1. 2 The Multiple Regression Model 1 Multiple Linear Regression Contents 1 Introduction 1 2 The Multiple Regression Model 1 3 Setting Up a Multiple Regression Model 2 3.1 Introduction.............................. 2 3.2 Significance Tests

More information

Chapter 8: Transformations. October 15, For most practical problems, there is no theory to tell us the correct form for the mean function,

Chapter 8: Transformations. October 15, For most practical problems, there is no theory to tell us the correct form for the mean function, Chapter 8: Transformations October 15, 2018 For most practical problems, there is no theory to tell us the correct form for the mean function, and any parametric form we use is little more than an approximation

More information

Plotting Your Coefficients

Plotting Your Coefficients Plotting Your Coefficients Thomas B. Pepinsky Department of Government Cornell University pepinsky@cornell.edu April 6, 2015 Pepinsky Coefficient Plots April 6, 2015 1 / 12 Arguments for Plotting Regression

More information

Eksamen. Emnekode: Emnenavn: ME-408 Econometrics. Dato: Varighet 9:00-42:00. Antall sider inkl. forside 7. Tillatte hjelpemidler

Eksamen. Emnekode: Emnenavn: ME-408 Econometrics. Dato: Varighet 9:00-42:00. Antall sider inkl. forside 7. Tillatte hjelpemidler Eksamen Emnekode: Emnenavn: ME-408 Econometrics Dato: 16.05.2011 Varighet 9:00-42:00 Antall sider inkl. forside 7 Tillatte hjelpemidler Merknader -Dictionary (English-XX, XX-English) -Pocket calculator

More information

Variances: I. Be 2. B1 x 21 x 2p. y 1 1 x 11 x 1p

Variances: I. Be 2. B1 x 21 x 2p. y 1 1 x 11 x 1p Variances: I so far, models we ve considered for multiple linear regression (MLR) have consisted of mean function of form E(Y X = ) = 0 + 1 1 + + p p and variance function of form Var(Y X = ) = 2 given

More information

Confidence Intervals, Testing and ANOVA Summary

Confidence Intervals, Testing and ANOVA Summary Confidence Intervals, Testing and ANOVA Summary 1 One Sample Tests 1.1 One Sample z test: Mean (σ known) Let X 1,, X n a r.s. from N(µ, σ) or n > 30. Let The test statistic is H 0 : µ = µ 0. z = x µ 0

More information

Business Statistics. Lecture 10: Correlation and Linear Regression

Business Statistics. Lecture 10: Correlation and Linear Regression Business Statistics Lecture 10: Correlation and Linear Regression Scatterplot A scatterplot shows the relationship between two quantitative variables measured on the same individuals. It displays the Form

More information

y ˆ i = ˆ " T u i ( i th fitted value or i th fit)

y ˆ i = ˆ  T u i ( i th fitted value or i th fit) 1 2 INFERENCE FOR MULTIPLE LINEAR REGRESSION Recall Terminology: p predictors x 1, x 2,, x p Some might be indicator variables for categorical variables) k-1 non-constant terms u 1, u 2,, u k-1 Each u

More information

Regression Models - Introduction

Regression Models - Introduction Regression Models - Introduction In regression models, two types of variables that are studied: A dependent variable, Y, also called response variable. It is modeled as random. An independent variable,

More information

Random Number Generation. CS1538: Introduction to simulations

Random Number Generation. CS1538: Introduction to simulations Random Number Generation CS1538: Introduction to simulations Random Numbers Stochastic simulations require random data True random data cannot come from an algorithm We must obtain it from some process

More information

Review of Statistics 101

Review of Statistics 101 Review of Statistics 101 We review some important themes from the course 1. Introduction Statistics- Set of methods for collecting/analyzing data (the art and science of learning from data). Provides methods

More information

Lecture 18 MA Applied Statistics II D 2004

Lecture 18 MA Applied Statistics II D 2004 Lecture 18 MA 2612 - Applied Statistics II D 2004 Today 1. Examples of multiple linear regression 2. The modeling process (PNC 8.4) 3. The graphical exploration of multivariable data (PNC 8.5) 4. Fitting

More information

1. Variance stabilizing transformations; Box-Cox Transformations - Section. 2. Transformations to linearize the model - Section 5.

1. Variance stabilizing transformations; Box-Cox Transformations - Section. 2. Transformations to linearize the model - Section 5. Ch. 5: Transformations and Weighting 1. Variance stabilizing transformations; Box-Cox Transformations - Section 5.2; 5.4 2. Transformations to linearize the model - Section 5.3 3. Weighted regression -

More information

Lecture 5: Clustering, Linear Regression

Lecture 5: Clustering, Linear Regression Lecture 5: Clustering, Linear Regression Reading: Chapter 10, Sections 3.1-3.2 STATS 202: Data mining and analysis October 4, 2017 1 / 22 .0.0 5 5 1.0 7 5 X2 X2 7 1.5 1.0 0.5 3 1 2 Hierarchical clustering

More information

Ch. 5 Transformations and Weighting

Ch. 5 Transformations and Weighting Outline Three approaches: Ch. 5 Transformations and Weighting. Variance stabilizing transformations; Box-Cox Transformations - Section 5.2; 5.4 2. Transformations to linearize the model - Section 5.3 3.

More information

Regression Analysis IV... More MLR and Model Building

Regression Analysis IV... More MLR and Model Building Regression Analysis IV... More MLR and Model Building This session finishes up presenting the formal methods of inference based on the MLR model and then begins discussion of "model building" (use of regression

More information

5.2 Polynomial Operations

5.2 Polynomial Operations 5.2 Polynomial Operations At times we ll need to perform operations with polynomials. At this level we ll just be adding, subtracting, or multiplying polynomials. Dividing polynomials will happen in future

More information

Lecture 5: Clustering, Linear Regression

Lecture 5: Clustering, Linear Regression Lecture 5: Clustering, Linear Regression Reading: Chapter 10, Sections 3.1-3.2 STATS 202: Data mining and analysis October 4, 2017 1 / 22 Hierarchical clustering Most algorithms for hierarchical clustering

More information

Sociology 593 Exam 1 Answer Key February 17, 1995

Sociology 593 Exam 1 Answer Key February 17, 1995 Sociology 593 Exam 1 Answer Key February 17, 1995 I. True-False. (5 points) Indicate whether the following statements are true or false. If false, briefly explain why. 1. A researcher regressed Y on. When

More information

Nonlinear Regression

Nonlinear Regression Nonlinear Regression James H. Steiger Department of Psychology and Human Development Vanderbilt University James H. Steiger (Vanderbilt University) Nonlinear Regression 1 / 36 Nonlinear Regression 1 Introduction

More information

Lecture 6: Linear Regression

Lecture 6: Linear Regression Lecture 6: Linear Regression Reading: Sections 3.1-3 STATS 202: Data mining and analysis Jonathan Taylor, 10/5 Slide credits: Sergio Bacallado 1 / 30 Simple linear regression Model: y i = β 0 + β 1 x i

More information

Simple Linear Regression for the MPG Data

Simple Linear Regression for the MPG Data Simple Linear Regression for the MPG Data 2000 2500 3000 3500 15 20 25 30 35 40 45 Wgt MPG What do we do with the data? y i = MPG of i th car x i = Weight of i th car i =1,...,n n = Sample Size Exploratory

More information

Correlation 1. December 4, HMS, 2017, v1.1

Correlation 1. December 4, HMS, 2017, v1.1 Correlation 1 December 4, 2017 1 HMS, 2017, v1.1 Chapter References Diez: Chapter 7 Navidi, Chapter 7 I don t expect you to learn the proofs what will follow. Chapter References 2 Correlation The sample

More information

Simple Linear Regression for the Climate Data

Simple Linear Regression for the Climate Data Prediction Prediction Interval Temperature 0.2 0.0 0.2 0.4 0.6 0.8 320 340 360 380 CO 2 Simple Linear Regression for the Climate Data What do we do with the data? y i = Temperature of i th Year x i =CO

More information

Unit 10: Simple Linear Regression and Correlation

Unit 10: Simple Linear Regression and Correlation Unit 10: Simple Linear Regression and Correlation Statistics 571: Statistical Methods Ramón V. León 6/28/2004 Unit 10 - Stat 571 - Ramón V. León 1 Introductory Remarks Regression analysis is a method for

More information

Simple Linear Regression

Simple Linear Regression Simple Linear Regression OI CHAPTER 7 Important Concepts Correlation (r or R) and Coefficient of determination (R 2 ) Interpreting y-intercept and slope coefficients Inference (hypothesis testing and confidence

More information

WEIGHTED LEAST SQUARES. Model Assumptions for Weighted Least Squares: Recall: We can fit least squares estimates just assuming a linear mean function.

WEIGHTED LEAST SQUARES. Model Assumptions for Weighted Least Squares: Recall: We can fit least squares estimates just assuming a linear mean function. 1 2 WEIGHTED LEAST SQUARES Recall: We can fit least squares estimates just assuming a linear mean function. Without the constant variance assumption, we can still conclude that the coefficient estimators

More information

Multiple Linear Regression

Multiple Linear Regression Multiple Linear Regression University of California, San Diego Instructor: Ery Arias-Castro http://math.ucsd.edu/~eariasca/teaching.html 1 / 42 Passenger car mileage Consider the carmpg dataset taken from

More information

CHAPTER 17 CHI-SQUARE AND OTHER NONPARAMETRIC TESTS FROM: PAGANO, R. R. (2007)

CHAPTER 17 CHI-SQUARE AND OTHER NONPARAMETRIC TESTS FROM: PAGANO, R. R. (2007) FROM: PAGANO, R. R. (007) I. INTRODUCTION: DISTINCTION BETWEEN PARAMETRIC AND NON-PARAMETRIC TESTS Statistical inference tests are often classified as to whether they are parametric or nonparametric Parameter

More information

Simple Linear Regression for the Advertising Data

Simple Linear Regression for the Advertising Data Revenue 0 10 20 30 40 50 5 10 15 20 25 Pages of Advertising Simple Linear Regression for the Advertising Data What do we do with the data? y i = Revenue of i th Issue x i = Pages of Advertisement in i

More information

Lecture 5: Clustering, Linear Regression

Lecture 5: Clustering, Linear Regression Lecture 5: Clustering, Linear Regression Reading: Chapter 10, Sections 3.1-2 STATS 202: Data mining and analysis Sergio Bacallado September 19, 2018 1 / 23 Announcements Starting next week, Julia Fukuyama

More information

Hypothesis Testing. Week 04. Presented by : W. Rofianto

Hypothesis Testing. Week 04. Presented by : W. Rofianto Hypothesis Testing Week 04 Presented by : W. Rofianto Tests about a Population Mean: σ unknown Test Statistic t x 0 s / n This test statistic has a t distribution with n - 1 degrees of freedom. Example:

More information

Linear regression. Linear regression is a simple approach to supervised learning. It assumes that the dependence of Y on X 1,X 2,...X p is linear.

Linear regression. Linear regression is a simple approach to supervised learning. It assumes that the dependence of Y on X 1,X 2,...X p is linear. Linear regression Linear regression is a simple approach to supervised learning. It assumes that the dependence of Y on X 1,X 2,...X p is linear. 1/48 Linear regression Linear regression is a simple approach

More information

Multiple samples: Modeling and ANOVA

Multiple samples: Modeling and ANOVA Multiple samples: Modeling and Patrick Breheny April 29 Patrick Breheny Introduction to Biostatistics (171:161) 1/23 Multiple group studies In the latter half of this course, we have discussed the analysis

More information

ECON 497 Midterm Spring

ECON 497 Midterm Spring ECON 497 Midterm Spring 2009 1 ECON 497: Economic Research and Forecasting Name: Spring 2009 Bellas Midterm You have three hours and twenty minutes to complete this exam. Answer all questions and explain

More information

CS 5014: Research Methods in Computer Science

CS 5014: Research Methods in Computer Science Computer Science Clifford A. Shaffer Department of Computer Science Virginia Tech Blacksburg, Virginia Fall 2010 Copyright c 2010 by Clifford A. Shaffer Computer Science Fall 2010 1 / 207 Correlation and

More information

Part 1: You are given the following system of two equations: x + 2y = 16 3x 4y = 2

Part 1: You are given the following system of two equations: x + 2y = 16 3x 4y = 2 Solving Systems of Equations Algebraically Teacher Notes Comment: As students solve equations throughout this task, have them continue to explain each step using properties of operations or properties

More information

[y i α βx i ] 2 (2) Q = i=1

[y i α βx i ] 2 (2) Q = i=1 Least squares fits This section has no probability in it. There are no random variables. We are given n points (x i, y i ) and want to find the equation of the line that best fits them. We take the equation

More information

Chapter 4: Regression Models

Chapter 4: Regression Models Sales volume of company 1 Textbook: pp. 129-164 Chapter 4: Regression Models Money spent on advertising 2 Learning Objectives After completing this chapter, students will be able to: Identify variables,

More information

Lecture 14: Introduction to Poisson Regression

Lecture 14: Introduction to Poisson Regression Lecture 14: Introduction to Poisson Regression Ani Manichaikul amanicha@jhsph.edu 8 May 2007 1 / 52 Overview Modelling counts Contingency tables Poisson regression models 2 / 52 Modelling counts I Why

More information

Modelling counts. Lecture 14: Introduction to Poisson Regression. Overview

Modelling counts. Lecture 14: Introduction to Poisson Regression. Overview Modelling counts I Lecture 14: Introduction to Poisson Regression Ani Manichaikul amanicha@jhsph.edu Why count data? Number of traffic accidents per day Mortality counts in a given neighborhood, per week

More information

Chapter 7. Linear Regression (Pt. 1) 7.1 Introduction. 7.2 The Least-Squares Regression Line

Chapter 7. Linear Regression (Pt. 1) 7.1 Introduction. 7.2 The Least-Squares Regression Line Chapter 7 Linear Regression (Pt. 1) 7.1 Introduction Recall that r, the correlation coefficient, measures the linear association between two quantitative variables. Linear regression is the method of fitting

More information

Hypothesis Testing. Part I. James J. Heckman University of Chicago. Econ 312 This draft, April 20, 2006

Hypothesis Testing. Part I. James J. Heckman University of Chicago. Econ 312 This draft, April 20, 2006 Hypothesis Testing Part I James J. Heckman University of Chicago Econ 312 This draft, April 20, 2006 1 1 A Brief Review of Hypothesis Testing and Its Uses values and pure significance tests (R.A. Fisher)

More information

Simple Linear Regression

Simple Linear Regression Simple Linear Regression ST 430/514 Recall: A regression model describes how a dependent variable (or response) Y is affected, on average, by one or more independent variables (or factors, or covariates)

More information

Bivariate Data: Graphical Display The scatterplot is the basic tool for graphically displaying bivariate quantitative data.

Bivariate Data: Graphical Display The scatterplot is the basic tool for graphically displaying bivariate quantitative data. Bivariate Data: Graphical Display The scatterplot is the basic tool for graphically displaying bivariate quantitative data. Example: Some investors think that the performance of the stock market in January

More information

AP Statistics. The only statistics you can trust are those you falsified yourself. RE- E X P R E S S I N G D A T A ( P A R T 2 ) C H A P 9

AP Statistics. The only statistics you can trust are those you falsified yourself. RE- E X P R E S S I N G D A T A ( P A R T 2 ) C H A P 9 AP Statistics 1 RE- E X P R E S S I N G D A T A ( P A R T 2 ) C H A P 9 The only statistics you can trust are those you falsified yourself. Sir Winston Churchill (1874-1965) (Attribution to Churchill is

More information

Linear Regression. In this lecture we will study a particular type of regression model: the linear regression model

Linear Regression. In this lecture we will study a particular type of regression model: the linear regression model 1 Linear Regression 2 Linear Regression In this lecture we will study a particular type of regression model: the linear regression model We will first consider the case of the model with one predictor

More information

Chi Square Analysis M&M Statistics. Name Period Date

Chi Square Analysis M&M Statistics. Name Period Date Chi Square Analysis M&M Statistics Name Period Date Have you ever wondered why the package of M&Ms you just bought never seems to have enough of your favorite color? Or, why is it that you always seem

More information

Chapter 1 Statistical Inference

Chapter 1 Statistical Inference Chapter 1 Statistical Inference causal inference To infer causality, you need a randomized experiment (or a huge observational study and lots of outside information). inference to populations Generalizations

More information

General Linear Models. with General Linear Hypothesis Tests and Likelihood Ratio Tests

General Linear Models. with General Linear Hypothesis Tests and Likelihood Ratio Tests General Linear Models with General Linear Hypothesis Tests and Likelihood Ratio Tests 1 Background Linear combinations of Normals are Normal XX nn ~ NN μμ, ΣΣ AAAA ~ NN AAμμ, AAAAAA A sum of squared, standardized

More information

Formal Statement of Simple Linear Regression Model

Formal Statement of Simple Linear Regression Model Formal Statement of Simple Linear Regression Model Y i = β 0 + β 1 X i + ɛ i Y i value of the response variable in the i th trial β 0 and β 1 are parameters X i is a known constant, the value of the predictor

More information

Chapter 4. Regression Models. Learning Objectives

Chapter 4. Regression Models. Learning Objectives Chapter 4 Regression Models To accompany Quantitative Analysis for Management, Eleventh Edition, by Render, Stair, and Hanna Power Point slides created by Brian Peterson Learning Objectives After completing

More information

Regression Models - Introduction

Regression Models - Introduction Regression Models - Introduction In regression models there are two types of variables that are studied: A dependent variable, Y, also called response variable. It is modeled as random. An independent

More information

The scatterplot is the basic tool for graphically displaying bivariate quantitative data.

The scatterplot is the basic tool for graphically displaying bivariate quantitative data. Bivariate Data: Graphical Display The scatterplot is the basic tool for graphically displaying bivariate quantitative data. Example: Some investors think that the performance of the stock market in January

More information

MA 575 Linear Models: Cedric E. Ginestet, Boston University Midterm Review Week 7

MA 575 Linear Models: Cedric E. Ginestet, Boston University Midterm Review Week 7 MA 575 Linear Models: Cedric E. Ginestet, Boston University Midterm Review Week 7 1 Random Vectors Let a 0 and y be n 1 vectors, and let A be an n n matrix. Here, a 0 and A are non-random, whereas y is

More information

Chapter 10 Re-expressing Data: Get It Straight!

Chapter 10 Re-expressing Data: Get It Straight! Chapter 0 Re-expressing Data: Get It Straight! 23 Chapter 0 Re-expressing Data: Get It Straight!. s. a) The residuals plot shows no pattern. No re-expression is needed. b) The residuals plot shows a curved

More information

Business Statistics 41000: Homework # 5

Business Statistics 41000: Homework # 5 Business Statistics 41000: Homework # 5 Drew Creal Due date: Beginning of class in week # 10 Remarks: These questions cover Lectures #7, 8, and 9. Question # 1. Condence intervals and plug-in predictive

More information

Regression used to predict or estimate the value of one variable corresponding to a given value of another variable.

Regression used to predict or estimate the value of one variable corresponding to a given value of another variable. CHAPTER 9 Simple Linear Regression and Correlation Regression used to predict or estimate the value of one variable corresponding to a given value of another variable. X = independent variable. Y = dependent

More information

Statistics Univariate Linear Models Gary W. Oehlert School of Statistics 313B Ford Hall

Statistics Univariate Linear Models Gary W. Oehlert School of Statistics 313B Ford Hall Statistics 5401 14. Univariate Linear Models Gary W. Oehlert School of Statistics 313B ord Hall 612-625-1557 gary@stat.umn.edu Linear models relate a target or response or dependent variable to known predictor

More information

LAB 5 INSTRUCTIONS LINEAR REGRESSION AND CORRELATION

LAB 5 INSTRUCTIONS LINEAR REGRESSION AND CORRELATION LAB 5 INSTRUCTIONS LINEAR REGRESSION AND CORRELATION In this lab you will learn how to use Excel to display the relationship between two quantitative variables, measure the strength and direction of the

More information

Binary Logistic Regression

Binary Logistic Regression The coefficients of the multiple regression model are estimated using sample data with k independent variables Estimated (or predicted) value of Y Estimated intercept Estimated slope coefficients Ŷ = b

More information

Lab 3 A Quick Introduction to Multiple Linear Regression Psychology The Multiple Linear Regression Model

Lab 3 A Quick Introduction to Multiple Linear Regression Psychology The Multiple Linear Regression Model Lab 3 A Quick Introduction to Multiple Linear Regression Psychology 310 Instructions.Work through the lab, saving the output as you go. You will be submitting your assignment as an R Markdown document.

More information

Statistical Methods for Data Mining

Statistical Methods for Data Mining Statistical Methods for Data Mining Kuangnan Fang Xiamen University Email: xmufkn@xmu.edu.cn Linear regression Linear regression is a simple approach to supervised learning. It assumes that the dependence

More information

CAS MA575 Linear Models

CAS MA575 Linear Models CAS MA575 Linear Models Boston University, Fall 2013 Midterm Exam (Correction) Instructor: Cedric Ginestet Date: 22 Oct 2013. Maximal Score: 200pts. Please Note: You will only be graded on work and answers

More information

Inference about Clustering and Parametric. Assumptions in Covariance Matrix Estimation

Inference about Clustering and Parametric. Assumptions in Covariance Matrix Estimation Inference about Clustering and Parametric Assumptions in Covariance Matrix Estimation Mikko Packalen y Tony Wirjanto z 26 November 2010 Abstract Selecting an estimator for the variance covariance matrix

More information

STA Module 10 Comparing Two Proportions

STA Module 10 Comparing Two Proportions STA 2023 Module 10 Comparing Two Proportions Learning Objectives Upon completing this module, you should be able to: 1. Perform large-sample inferences (hypothesis test and confidence intervals) to compare

More information

Multiple Regression Analysis

Multiple Regression Analysis Multiple Regression Analysis y = 0 + 1 x 1 + x +... k x k + u 6. Heteroskedasticity What is Heteroskedasticity?! Recall the assumption of homoskedasticity implied that conditional on the explanatory variables,

More information

Multilevel Models in Matrix Form. Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2

Multilevel Models in Matrix Form. Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Multilevel Models in Matrix Form Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Today s Lecture Linear models from a matrix perspective An example of how to do

More information

Psychology 282 Lecture #4 Outline Inferences in SLR

Psychology 282 Lecture #4 Outline Inferences in SLR Psychology 282 Lecture #4 Outline Inferences in SLR Assumptions To this point we have not had to make any distributional assumptions. Principle of least squares requires no assumptions. Can use correlations

More information

Chapter 9 Re-expressing Data: Get It Straight!

Chapter 9 Re-expressing Data: Get It Straight! Chapter 9 Re-expressing Data: Get It Straight! 53 Chapter 9 Re-expressing Data: Get It Straight!. s. a) The residuals plot shows no pattern. No re-expression is needed. b) The residuals plot shows a curved

More information

Generalized Linear Models

Generalized Linear Models Generalized Linear Models Advanced Methods for Data Analysis (36-402/36-608 Spring 2014 1 Generalized linear models 1.1 Introduction: two regressions So far we ve seen two canonical settings for regression.

More information

One sided tests. An example of a two sided alternative is what we ve been using for our two sample tests:

One sided tests. An example of a two sided alternative is what we ve been using for our two sample tests: One sided tests So far all of our tests have been two sided. While this may be a bit easier to understand, this is often not the best way to do a hypothesis test. One simple thing that we can do to get

More information

Regression Analysis. Regression: Methodology for studying the relationship among two or more variables

Regression Analysis. Regression: Methodology for studying the relationship among two or more variables Regression Analysis Regression: Methodology for studying the relationship among two or more variables Two major aims: Determine an appropriate model for the relationship between the variables Predict the

More information

Nonlinear Regression Functions

Nonlinear Regression Functions Nonlinear Regression Functions (SW Chapter 8) Outline 1. Nonlinear regression functions general comments 2. Nonlinear functions of one variable 3. Nonlinear functions of two variables: interactions 4.

More information

Homoskedasticity. Var (u X) = σ 2. (23)

Homoskedasticity. Var (u X) = σ 2. (23) Homoskedasticity How big is the difference between the OLS estimator and the true parameter? To answer this question, we make an additional assumption called homoskedasticity: Var (u X) = σ 2. (23) This

More information

Section 3: Simple Linear Regression

Section 3: Simple Linear Regression Section 3: Simple Linear Regression Carlos M. Carvalho The University of Texas at Austin McCombs School of Business http://faculty.mccombs.utexas.edu/carlos.carvalho/teaching/ 1 Regression: General Introduction

More information

Part 8: GLMs and Hierarchical LMs and GLMs

Part 8: GLMs and Hierarchical LMs and GLMs Part 8: GLMs and Hierarchical LMs and GLMs 1 Example: Song sparrow reproductive success Arcese et al., (1992) provide data on a sample from a population of 52 female song sparrows studied over the course

More information

MATH 320, WEEK 6: Linear Systems, Gaussian Elimination, Coefficient Matrices

MATH 320, WEEK 6: Linear Systems, Gaussian Elimination, Coefficient Matrices MATH 320, WEEK 6: Linear Systems, Gaussian Elimination, Coefficient Matrices We will now switch gears and focus on a branch of mathematics known as linear algebra. There are a few notes worth making before

More information

Ch. 1: Data and Distributions

Ch. 1: Data and Distributions Ch. 1: Data and Distributions Populations vs. Samples How to graphically display data Histograms, dot plots, stem plots, etc Helps to show how samples are distributed Distributions of both continuous and

More information

Chapter 9. Correlation and Regression

Chapter 9. Correlation and Regression Chapter 9 Correlation and Regression Lesson 9-1/9-2, Part 1 Correlation Registered Florida Pleasure Crafts and Watercraft Related Manatee Deaths 100 80 60 40 20 0 1991 1993 1995 1997 1999 Year Boats in

More information

In the previous chapter, we learned how to use the method of least-squares

In the previous chapter, we learned how to use the method of least-squares 03-Kahane-45364.qxd 11/9/2007 4:40 PM Page 37 3 Model Performance and Evaluation In the previous chapter, we learned how to use the method of least-squares to find a line that best fits a scatter of points.

More information

Model Checking. Chapter 7

Model Checking. Chapter 7 Chapter 7 Model Checking In this chapter we consider methods for checking model assumptions and the use of transformations to correct problems with the assumptions. The primary method for checking model

More information

Diagnostics can identify two possible areas of failure of assumptions when fitting linear models.

Diagnostics can identify two possible areas of failure of assumptions when fitting linear models. 1 Transformations 1.1 Introduction Diagnostics can identify two possible areas of failure of assumptions when fitting linear models. (i) lack of Normality (ii) heterogeneity of variances It is important

More information

INTRODUCTION TO INTERSECTION-UNION TESTS

INTRODUCTION TO INTERSECTION-UNION TESTS INTRODUCTION TO INTERSECTION-UNION TESTS Jimmy A. Doi, Cal Poly State University San Luis Obispo Department of Statistics (jdoi@calpoly.edu Key Words: Intersection-Union Tests; Multiple Comparisons; Acceptance

More information

Sociology 593 Exam 2 Answer Key March 28, 2002

Sociology 593 Exam 2 Answer Key March 28, 2002 Sociology 59 Exam Answer Key March 8, 00 I. True-False. (0 points) Indicate whether the following statements are true or false. If false, briefly explain why.. A variable is called CATHOLIC. This probably

More information

Second Midterm Exam Name: Solutions March 19, 2014

Second Midterm Exam Name: Solutions March 19, 2014 Math 3080 1. Treibergs σιι Second Midterm Exam Name: Solutions March 19, 2014 (1. The article Withdrawl Strength of Threaded Nails, in Journal of Structural Engineering, 2001, describes an experiment to

More information

Problem Set #6: OLS. Economics 835: Econometrics. Fall 2012

Problem Set #6: OLS. Economics 835: Econometrics. Fall 2012 Problem Set #6: OLS Economics 835: Econometrics Fall 202 A preliminary result Suppose we have a random sample of size n on the scalar random variables (x, y) with finite means, variances, and covariance.

More information

The Simple Regression Model. Part II. The Simple Regression Model

The Simple Regression Model. Part II. The Simple Regression Model Part II The Simple Regression Model As of Sep 22, 2015 Definition 1 The Simple Regression Model Definition Estimation of the model, OLS OLS Statistics Algebraic properties Goodness-of-Fit, the R-square

More information

17. Introduction to Tree and Neural Network Regression

17. Introduction to Tree and Neural Network Regression 17. Introduction to Tree and Neural Network Regression As we have repeated often throughout this book, the classical multiple regression model is clearly wrong in many ways. One way that the model is wrong

More information

Transformations. Merlise Clyde. Readings: Gelman & Hill Ch 2-4, ALR 8-9

Transformations. Merlise Clyde. Readings: Gelman & Hill Ch 2-4, ALR 8-9 Transformations Merlise Clyde Readings: Gelman & Hill Ch 2-4, ALR 8-9 Assumptions of Linear Regression Y i = β 0 + β 1 X i1 + β 2 X i2 +... β p X ip + ɛ i Model Linear in X j but X j could be a transformation

More information

Regression Models. Chapter 4. Introduction. Introduction. Introduction

Regression Models. Chapter 4. Introduction. Introduction. Introduction Chapter 4 Regression Models Quantitative Analysis for Management, Tenth Edition, by Render, Stair, and Hanna 008 Prentice-Hall, Inc. Introduction Regression analysis is a very valuable tool for a manager

More information

HOMEWORK ANALYSIS #2 - STOPPING DISTANCE

HOMEWORK ANALYSIS #2 - STOPPING DISTANCE HOMEWORK ANALYSIS #2 - STOPPING DISTANCE Total Points Possible: 35 1. In your own words, summarize the overarching problem and any specific questions that need to be answered using the stopping distance

More information

Normal distribution We have a random sample from N(m, υ). The sample mean is Ȳ and the corrected sum of squares is S yy. After some simplification,

Normal distribution We have a random sample from N(m, υ). The sample mean is Ȳ and the corrected sum of squares is S yy. After some simplification, Likelihood Let P (D H) be the probability an experiment produces data D, given hypothesis H. Usually H is regarded as fixed and D variable. Before the experiment, the data D are unknown, and the probability

More information

Tutorial 6: Linear Regression

Tutorial 6: Linear Regression Tutorial 6: Linear Regression Rob Nicholls nicholls@mrc-lmb.cam.ac.uk MRC LMB Statistics Course 2014 Contents 1 Introduction to Simple Linear Regression................ 1 2 Parameter Estimation and Model

More information

STAT420 Midterm Exam. University of Illinois Urbana-Champaign October 19 (Friday), :00 4:15p. SOLUTIONS (Yellow)

STAT420 Midterm Exam. University of Illinois Urbana-Champaign October 19 (Friday), :00 4:15p. SOLUTIONS (Yellow) STAT40 Midterm Exam University of Illinois Urbana-Champaign October 19 (Friday), 018 3:00 4:15p SOLUTIONS (Yellow) Question 1 (15 points) (10 points) 3 (50 points) extra ( points) Total (77 points) Points

More information

A Note on Visualizing Response Transformations in Regression

A Note on Visualizing Response Transformations in Regression Southern Illinois University Carbondale OpenSIUC Articles and Preprints Department of Mathematics 11-2001 A Note on Visualizing Response Transformations in Regression R. Dennis Cook University of Minnesota

More information

Simple Linear Regression

Simple Linear Regression Simple Linear Regression ST 370 Regression models are used to study the relationship of a response variable and one or more predictors. The response is also called the dependent variable, and the predictors

More information

So far our focus has been on estimation of the parameter vector β in the. y = Xβ + u

So far our focus has been on estimation of the parameter vector β in the. y = Xβ + u Interval estimation and hypothesis tests So far our focus has been on estimation of the parameter vector β in the linear model y i = β 1 x 1i + β 2 x 2i +... + β K x Ki + u i = x iβ + u i for i = 1, 2,...,

More information

Diagnostics and Transformations Part 2

Diagnostics and Transformations Part 2 Diagnostics and Transformations Part 2 Bivariate Linear Regression James H. Steiger Department of Psychology and Human Development Vanderbilt University Multilevel Regression Modeling, 2009 Diagnostics

More information

Correlation. A statistics method to measure the relationship between two variables. Three characteristics

Correlation. A statistics method to measure the relationship between two variables. Three characteristics Correlation Correlation A statistics method to measure the relationship between two variables Three characteristics Direction of the relationship Form of the relationship Strength/Consistency Direction

More information