Linear Regression Models

Size: px
Start display at page:

Download "Linear Regression Models"

Transcription

1 Linear Regression Models November 13, / 89

2 1 Basic framework Model specification and assumptions Parameter estimation: least squares method Coefficient of determination R 2 Properties of the least squares estimators Hypothesis testing on regression coefficients 2 Regression diagnostics Residuals Influential observations and leverage points Multicollinearity 3 Categorical predictors Dummy variable coding 2 / 89

3 Basic framework 1 Basic framework Model specification and assumptions Parameter estimation: least squares method Coefficient of determination R 2 Properties of the least squares estimators Hypothesis testing on regression coefficients 2 Regression diagnostics Residuals Influential observations and leverage points Multicollinearity 3 Categorical predictors Dummy variable coding 3 / 89

4 Basic framework When to use Regression Analysis Regression analysis is used for explaining or modeling the relationship between a single variable Y, called the response, output or dependent variable, and one or more predictor, input, independent or explanatory variables, X 1,..., X p. when p = 1, it is called simple regression; when p > 1 it is called multiple regression or sometimes multivariate regression; when there is more than one Y, then it is called multivariate multiple regression. The response must be a continuous variable but the explanatory variables can be continuous, discrete or categorical. 4 / 89

5 Basic framework Linear Model One very general form for the model would be: Y = f (X 1, X 2, X 3 ) + ɛ where f is some unknown function and ɛ is the error which is additive in this instance. Since we usually don t have enough data to try to estimate f directly, we usually have to assume that it has some more restricted form, perhaps linear as in Y = β 0 + β 1 X 1 + β 2 X 2 + β 3 X 3 + ɛ where β j, j = 0, 1, 2, 3 are unknown parameters. β 0 is called the intercept term. Thus the problem is reduced to the estimation of four values rather than the complicated infinite dimensional f. In a linear model the parameters enter linearly the predictors do not have to be linear. 5 / 89

6 Notation Basic framework Model specification and assumptions The following notation is typical of that used to represent the elements of a linear model: y i = β 0 + β 1 x i β k 1 X ik 1 + ɛ i (1) The subscript (i) is used to represent a set of observations (usually from 1 to n where n is the total sample size). The y i and x i represent respectively the i th observation of the Y and X j variables (j = 1,..., k 1). ɛ i represents the deviation of the i th observed Y from the value of Y expected by the model component. The parameters β 0 and β j represent population intercept and population slopes (effect of X j on Y per unit of x). 6 / 89

7 Basic framework Matrix notation Model specification and assumptions The regression equation in matrix notation is written as: y = X β + ɛ (2) y 1 1 x x 1,k 1 y 2 1 x y n 1 =. X x 2,k 1 n k =.... β k 1 = y n 1 x n1... x n,k 1 β 0 β 1. β k 1 ɛ 1 ɛ ɛ 2 n 1 =.. ɛ n The column of ones incorporates the intercept term. 7 / 89

8 Basic framework Geometrical representation Model specification and assumptions The model Album Sales i = β 0 + β 1 Advertising budget i + β 2 Airplay i + ɛ i 8 / 89

9 Basic framework Model assumptions Model specification and assumptions 1 Linearity of relation between y and X : y = X β + ɛ 2 The average value of random terms is null: E[ɛ 1 ] 0 E[ɛ] =. =. E[ɛ n ] 0 E[y] = E[X β + ɛ] = E[X β] + E[ɛ] = X β The average values of the random variables that generate the observed values of the dependent variable y lie along the regression hyperplane. 9 / 89

10 Basic framework Model assumptions Model specification and assumptions 3 Omoschedasticity and non-correlation between random terms: var[ɛ] = E[ɛɛ ] = σ 2 I n var[ɛ] = E[ɛɛ ] E[ɛ]E[ɛ ] = E[ɛɛ ] E[ɛ 1 ɛ 1 ] E[ɛ 1 ɛ 1 ]... E[ɛ 1 ɛ n ] E[ɛ 2 ɛ 1 ] E[ɛ 2 ɛ 2 ]... E[ɛ 2 ɛ n ] = E[ɛ n ɛ 1 ] E[ɛ n ɛ 2 ]... E[ɛ n ɛ n ] σ σ = σ 2 10 / 89

11 Basic framework Model assumptions Model specification and assumptions 4 No information from X can help to understand the nature of ɛ: E[ɛ X ] = 0 5 X is a (non stochastic) matrix n K, of rank K The independent variables X j are supposed to be linearly independent, i.e. no one can be expressed as a linear combination of the others. If the linearly independence of the predictors is not assured, the model is not identifiable, i.e. we can not obtain a unique solution for model parameter estimates. 11 / 89

12 Basic framework Model assumptions Model specification and assumptions 6 Errors are independent and identically normally distributed with mean 0 and variance σ 2 : ɛ N(0, σ 2 I n ) It is necessary to assume a distributional form for the errors ɛ to make confidence intervals or perform hypothesis tests. Now since y = X β + ɛ and given assumptions 5 and 6 it follows that: var(y) = var(x β + ɛ) = var(ɛ) = σ 2 I n y N(X β, σ 2 I n ) 12 / 89

13 Basic framework Model parameters estimation Parameter estimation: least squares method y i = β 0 + β 1 x i β k 1 x ik 1 + ɛ i ɛ i N(0, σ 2 I n ) The parameter to be estimated are: the regression coefficients β β k 1 the intercept β o the error variance σ 2 Each β j should be interpreted as the expected change in y when a unitary change is observed in X j while all other predictors are kept constant. The intercept is the expected mean value of y when all X j = / 89

14 Basic framework Least squares estimation Parameter estimation: least squares method The least squares estimate of β minimizes the sum of the squared errors: n n ( ɛ 2 1 = y i x i β ) 2 i=1 where β is an arbitrary vector of coefficients (real numbers). We look for β minimizing i=1 f ( β) = ɛ ɛ = (y X β) (y X β) = min and by expanding the product it is obtained that: f ( β) = ɛ ɛ = y y β X y y X β + β X X β = y y 2 β X y + β X X β 14 / 89

15 Basic framework Least squares estimation Parameter estimation: least squares method Differentiating with respect to β and setting to zero δf ( β) δ β = 2X y + 2X X β = 0 The solution of this equation is a vector ˆβ such that: X X ˆβ = X y These are called the normal equations. Now provided X X (a square matrix k k) is invertible ˆβ = (X X ) 1 X y 15 / 89

16 Basic framework Parameter estimation: least squares method Estimated regression equation and prediction The least squares method leads to estimating the coefficients as: ˆβ = (X X ) 1 X y By using the parameter estimations it is possible to write the estimated regression line: ŷ i = ˆβ 0 + ˆβ 1 x i ˆβ k 1 x ik 1 And obtain a prediction for a new observed x 0 ŷ 0 = ˆβ 0 + ˆβ 1 x ˆβ k 1 x 0k 1 x 0 is a vector that has not been used to get parameter estimations. 16 / 89

17 Basic framework Parameter estimation: least squares method Algebraic aspects related to the least squares solution The results obtained with the least squares allow to separate the vector of observations y in two parts, the fitted values ŷ = X ˆβ and the residuals e: y = X ˆβ + e = ŷ + e Since ˆβ = (X X ) 1 X y, it follows that: ŷ = X ˆβ = X (X X ) 1 X y = Hy The matrix H is symmetric (H = H ), idempotent (H H = H 2 = H) and is called prediction matrix, since it provides the vector of the fitted values in the regression of y on X. 17 / 89

18 Basic framework Geometrical perspective Parameter estimation: least squares method The data vector y is projected orthogonally onto the model space spanned by X. The fit is represented by projection ŷ = X ˆβ with the difference between the fit and the data represented by the residual vector e. ˆβ is in some sense the best estimate of β within the model space. The response predicted by the model is ŷ = X ˆβ = X (X X ) 1 X y = Hy where H is an orthogonal projection matrix. 18 / 89

19 Basic framework Estimating σ 2 Parameter estimation: least squares method After some calculation, one can show that ( n ) E = E (e e) = σ 2 (n k) which shows that i=1 e 2 i s 2 = is an unbiased estimator of σ 2 n e e n k = i=1 e2 i n k (n k) is the degrees of freedom of the model. The square root of s 2 is named standard error of regression and can be interpreted as the average squared deviation of the dependent variable values y around the regression hyperplan. 19 / 89

20 Basic framework Example: investment data Parameter estimation: least squares method Year Investment (y) GDP (X 1) Trend (X 2) Source: ISTAT (values are in thousands of billions) 20 / 89

21 Basic framework Example: investment data Parameter estimation: least squares method The model INVEST = β 0 + β 1 GDP + β 2 TREND + ɛ The parameters β 0 : the value of the investments when the explanatory variables are equal to zero. β 1 : the increase in investments when there is a unit GDP growth, keeping the value of the trend fixed. β 2 : the increase in investments when there is a one-off increase in the trend (i.e., it passes from one year to the next), while maintaining the value of GDP. 21 / 89

22 Basic framework Example: investment data Parameter estimation: least squares method The quantities β 0, β 1, and β 3 are the parameters to be estimated by the relation: (X X ) ˆβ = X y By solving the system of normal equations we get: Variables ˆβ j Intercept (X 0 ) GDP (X 1 ) TREND (X 2 ) If GDP increases by 1 billion, investments will increase by 625 millions, keeping the trend constant. If the trend increases by one unit (ie one year to the next), investments will decrease by billions if the GDP is kept constant. 22 / 89

23 Basic framework Coefficient of determination R 2 Goodness of Fit In a linear regression model (with an intercept), the least squares condition implies that the sum of squares of the dependent variable can be expressed as the sum of two components 1 : n (y i ȳ) 2 = i=1 n (ŷ i ȳ) 2 + i=1 TSS = ESS + RSS n i=1 e 2 i Coefficient of determination or percentage of variance explained R 2 = 1 RSS TSS = ESS TSS 23 / 89

24 Basic framework Coefficient of determination R 2 Coefficient of determination R 2 = 1 RSS TSS = ESS TSS The range is 0 R values closer to 1 indicating better fits: R 2 = 1 indicates a perfect fit (y i = ŷ i i) R 2 = 0 indicates that the fitted values are identical to the average value of the dependent variable (ŷ i = ȳ i) It expresses the percentage of y variance explained by the model. It can be expressed as the square of the correlation between observed values and estimated values: R 2 = r 2 y,ŷ = [cov (y, ŷ)]2 var(y)var(ŷ) 24 / 89

25 Basic framework Coefficient of determination R 2 The Adjusted R 2 The coefficient R 2 is a nondecreasing function of the number of explanatory variables. In comparing two regression models with the same dependent variable but differing number of X variables, the number of X variables present in the model must be taken into account. It is a good practice to use adjusted R 2 rather than R 2 because this latter tends to give an overly optimistic picture of the fit of the regression, particularly when the number of explanatory variables is not very small compared with the number of observations. R 2 a = 1 n 1 n (k 1) 1 (1 R2 ) 25 / 89

26 Basic framework Coefficient of determination R 2 Example: investment data INVEST = GDP TREND R 2 = R 2 a = The regression model explains 94% of the variance of the dependent variable, i.e. 94% of the variability of the investments is attributable to the linear relationship with GDP and TREND. 26 / 89

27 Basic framework Mean and Variance of ˆβ Properties of the least squares estimators ˆβ = ( X X ) 1 X y E( ˆβ) = β(unbiased) var( ˆβ) = σ 2 (X X ) 1 Note that since ˆβ is a vector, σ 2 (X X ) 1 is a variance-covariance matrix. Sometimes you want the standard error for a particular component which can be picked out as in se( ˆβ j ) = (X X ) 1 jj σ 27 / 89

28 Basic framework Gauss-Markov theorem Properties of the least squares estimators In the linear regression model, the beta estimator obtained with the least squares method is the most efficient estimator (minimum variance) in the class of linear and unbiased estimators. The Gauss-Markov theorem shows that the least squares estimate ˆβ is a good choice, but if the errors are correlated or have unequal variance, there will be better estimators: When the errors are correlated or have unequal variance, generalized least squares should be used. When the error distribution is long-tailed, then robust estimates might be used. Robust estimates are typically not linear in y. When the predictors are highly correlated (collinear), then biased estimators such as ridge regression might be preferable. 28 / 89

29 Basic framework Distribution of ˆβ Properties of the least squares estimators Assuming that the errors are independent and identically normally distributed with mean 0 and variance σ 2, i.e. ɛ N ( 0, σ 2 I ) and since y = X β + ɛ y N ( X β, σ 2 I ) and from this we find that (using the fact that linear combinations of normally distributed values are also normal) ˆβ N ( β, σ 2 (X X ) 1) ˆβ i N ( β j, σ 2 S jj) where with the S jj symbol we indicate the element at the intersection of the j-th row and the j-th column of the matrix (X X ) 1 29 / 89

30 Basic framework Testing just one predictor Hypothesis testing on regression coefficients Let us consider the null hypothesis (H 0 ) against the alternative bilateral hypothesis (H 1 ): H 0 : β j = 0 vs H 1 : β j 0 And the corresponding test statistic is: t j = ˆβ j β j s ˆβj T (n k) Decision rule classical approach p-value approach 30 / 89

31 Basic framework Decision rule: classical approach Hypothesis testing on regression coefficients We reject H 0 : β = 0 with the error probability α if: t j > t 1 α 2 ;(n k) 31 / 89

32 Basic framework Decision rule: p-value approach Hypothesis testing on regression coefficients We reject H 0 : β = 0 with the error probability α if: where p value = Pr( t n k > t j ) p value < α 32 / 89

33 Basic framework Example: investment data Hypothesis testing on regression coefficients Let us consider the null hypothesis (H 0 ) against the alternative bilateral hypothesis (H 1 ): H 0 : β 1 = 0 vs H 1 : β 1 0 And the corresponding test statistic is: t 1 = ˆβ 1 β 1 s ˆβ1 = = t (n k) = / 89

34 Basic framework Example: investment data Hypothesis testing on regression coefficients t j = > t 1 α 2 ;(n k) = We reject H 0 : β = 0 with the error probability α = 0.05 It makes sense to use the GDP variable to describe the behavior of investments. 34 / 89

35 Basic framework Overall F test Hypothesis testing on regression coefficients We want to test the null hypothesis H 0 = there is no a linear relation between Y and the Xs versus the alternative hypothesis H 1 = there is a linear relation between at least one of the predictors and the response. For a multiple regression model the overall F-test is: H 0 : y = β 0 1 n + ɛ vs H 1 : y = X β + ɛ We will test the null model M 0 against our model M 1 35 / 89

36 Basic framework Overall F test Hypothesis testing on regression coefficients Hypotheses H 0 : y = β 0 1 n + ɛ vs H 1 : y = X β + ɛ Test statistic F = ESS/(k 1) RSS/(n k) F (α;k 1,n k) Decision rule H 0 will be rejected with a significance level of α if F > F (α;k 1,n k) Pr(F (α;k 1,n k) > F ) < α 36 / 89

37 Basic framework ANOVA table as a regression output Hypothesis testing on regression coefficients Source DF Sum Squares Mean Squares F Regression k-1 ESS ESS/k 1 Error n-k RSS RSS/n k Total n-1 TSS ESS/k 1 RSS/n k Traditionally, the information in the overall F test is presented in an analysis of variance table. Most computer packages produce a variant on this. As the originator of the table, Fisher said in 1931, it is nothing but a convenient way of arranging the arithmetic. 37 / 89

38 Basic framework Example: investment data Hypothesis testing on regression coefficients Source DF Sum Squares Mean Squares F p-value Regression E-08 Error Total We conclude that at least one of the regression coefficients is significantly different from zero and that the regression model as a whole has its own statistical reason. 38 / 89

39 Basic framework Confidence Intervals for each β j individually Hypothesis testing on regression coefficients Confidence intervals provide an alternative way of expressing the uncertainty in our estimates. Even so, they are closely linked to the tests that we have already constructed. Confidence interval for the β j coefficient: ( Pr ˆβj t α s ˆβj β j ˆβ ) j t α s ˆβ j = 1 α If the above interval does not include zero, the β j coefficient can be considered statistically significant at the 5% level. 39 / 89

40 Basic framework Example: investment data Hypothesis testing on regression coefficients Confidence interval for the β 1 coefficient: ( Pr ˆβ1 t α s β ˆβ1 1 ˆβ 1 t α s ˆβ1) = 1 α Pr (0.499 β ) = 1 α There is a 95% probability that a unit increase in GDP (X 1 ), keeping the value of the trend constant, investments increase from an amount ranging from 499 to 752 billion. 40 / 89

41 Regression diagnostics 1 Basic framework Model specification and assumptions Parameter estimation: least squares method Coefficient of determination R 2 Properties of the least squares estimators Hypothesis testing on regression coefficients 2 Regression diagnostics Residuals Influential observations and leverage points Multicollinearity 3 Categorical predictors Dummy variable coding 41 / 89

42 Regression diagnostics Diagnostics Regression diagnostics are used to detect problems with the model and suggest improvements. Residual analysis to determines if the hypotheses formulated on the error term of the regression model are valid with respect to the analyzed phenomenon; to identifies the presence of outliers (abnormal observations with respect to the dependent variable Y), leverage points (abnormal observations over the X), influencing observations (observations whose inclusion greatly modifies the estimates of the least squares). 42 / 89

43 Residuals Regression diagnostics Residuals e = y i ŷ i residuals are the basis for measuring the variability of y not explained by the regression model. e i = ˆɛ i any departure from the assumed hypotheses affects the values of the residuals. 43 / 89

44 Residuals Regression diagnostics Residuals Recall that ŷ = X (X X ) 1 X y = Hy where H is the hat-matrix: e = y ŷ = (I H)y = (I H)X β + (I H)ɛ = (I H)ɛ So var(e) = var(i H)ɛ = (I H)σ 2 assuming that var(ɛ) = σ 2 I. We see that although the errors may have equal variance and be uncorrelated the residuals do not. 44 / 89

45 Regression diagnostics Studentized residuals Residuals r i = e i s 1 h ii i = 1,..., n. If the model assumptions are correct var(r i ) = 1 and corr(r i, r j ) tends to be small. Studentized residuals are sometimes preferred in residual plots as they have been standardized to have equal variance: only when there is unusually large leverage will the differences be noticeable. Studentization can only correct for the natural non-constant variance in residuals when the errors have constant variance: if there is some underlying heteroscedascity in the errors, studentization cannot correct for it. Any abnormal observation will inevitably affect s and thus also the studentized residuals. 45 / 89

46 Regression diagnostics Jacknife residuals Residuals Let s (i) denote the residual variance after eliminating the i-th observation: r i = e i s (i) 1 hii i = 1,..., n Fortunately there is an easy way to compute ri, which avoids doing n regressions: ( ) 2 n k 1 ri = r i n k ri 2 i = 1,..., n Since ri t n k 1, jacknife residuals above 2.5 in absolute value represent potential outliers. 46 / 89

47 Regression diagnostics Notes on outliers Residuals 1 Two or more outliers next to each other can hide each other. 2 An outlier in one model may not be an outlier in another when the variables have been changed or transformed. 3 The error distribution may not be normal and so larger residuals may be expected. 4 For large datasets, we need only worry about clusters of outliers. Such clusters are less likely to occur by chance and more likely to represent actual structure. Finding these cluster is not always easy. 47 / 89

48 Regression diagnostics What should be done about outliers? Residuals 1 Check for a data entry error first. These are relatively common. 2 Examine the physical context - why did it happen? Sometimes, the discovery of an outlier may be of singular interest. 3 Exclude the point from the analysis: to avoid any suggestion of dishonesty, always report the existence of outliers even if you do not include them in your final model. 48 / 89

49 Regression diagnostics Leverage point Influential observations and leverage points h i = H ii are called leverages and are useful diagnostics that depends only on X. We see that: var(e i ) = σ 2 (1 h i ) so that a large leverage for h i will make var(e i ) small in other words the fit will be forced to be close to y i. Rule of thumb Since an average value for h i is k n leverages of more than 2 k n should be looked at more closely. 49 / 89

50 Regression diagnostics Leverage points and outliers Influential observations and leverage points The two additional points marked by a triangular and a circle both have high leverage because they are far from the rest of the data: the triangular is not an outlier; the circle does not have a large residual if it is included in the fit. The solid line is the fit including the triangular point but not the circle point. The dotted line is the fit without either additional point and the dashed line is the fit with the circle point but not the triangle point. 50 / 89

51 Regression diagnostics Influential observations Influential observations and leverage points An influential point is one whose removal from the dataset would cause a large change in the fit. An influential point may or may not be an outlier and may or may not have large leverage but it will tend to have at least one of those two properties. The triangle point is not an influential point but the circle point is. 51 / 89

52 Regression diagnostics Measures of influence Influential observations and leverage points Cook distance D i = ( ˆβ (i) ˆβ) X X ( ˆβ (i) ˆβ) (ks 2 ) h ii ri 2 = 1 h ii k The subscripted (i) indicates the fit without case (i). The combination of the residual and leverage effects leads to influence. High D i values indicate influential observations on the vector of β parameters. 52 / 89

53 Regression diagnostics Residual plots Influential observations and leverage points 1 residuals vs fitted values: Things to look for are heteroscedascity (non-constant variance) and nonlinearity: if all is well, you should see constant variance in the vertical (e) direction and the scatter should be symmetric vertically about 0. 2 residuals vs each predictors: Look for the same things except in the case of plots against predictors not in the model, look for any relationship which might indicate that this predictor should be included. 3 q-q plot, histogram, boxplot to check the Normality assumtion. 53 / 89

54 Regression diagnostics Residual plots Influential observations and leverage points 54 / 89

55 Regression diagnostics Residual plots: normality Influential observations and leverage points 55 / 89

56 Regression diagnostics Residual plots: normality Influential observations and leverage points The consequences of non-normality are: that the least squares estimates may not be optimal - they will still be BLUE but other robust estimators may be more effective. that the tests and confidence intervals are invalid. However, it has been shown that only really longtailed distributions cause a problem. Mild non-normality can safely be ignored and the larger the sample size the less troublesome the non-normality. what to do? 1 A transformation of the response may solve the problem. 2 Accept non-normality and base the inference on the assumption of another distribution or use resampling methods 3 For short-tailed distributions, the consequences of non-normality are not serious and can reasonably be ignored. 56 / 89

57 Regression diagnostics Residual plots: correlated errors Influential observations and leverage points We assume that the errors are uncorrelated but for temporally or spatially related data this may well be untrue. For such data, it is wise to check the uncorrelated assumption. Plot e against time. Use formal tests like the Durbin-Watson or the run test. what to do? If you do have correlated errors, you can use Generalized Least Squares. 57 / 89

58 Regression diagnostics Residual plots: correlated errors Influential observations and leverage points 58 / 89

59 Regression diagnostics Example: investment data Influential observations and leverage points The residuals tend to disperse randomly above and below their average. 59 / 89

60 Regression diagnostics Example: investment data Influential observations and leverage points There are no observations with high residuals, but a non-casual pattern is shown over the time. 60 / 89

61 Regression diagnostics Example: investment data Influential observations and leverage points There are no residues that exceed 2.5 in absolute value, so no outliers are highlighted. 61 / 89

62 Regression diagnostics Example: investment data Influential observations and leverage points There are no observations that exceed the cut-off: 2 k n = / 89

63 Regression diagnostics Example: investment data Influential observations and leverage points The most influential value in the ˆβ estimate is associated with the / 89

64 Regression diagnostics The multicollinearity Multicollinearity For b-variables regression involving explanatory variables x 1,..., x b (where x 1 = 0 for all observations to allow for the intercept term), an exact linear relationship is said to exist if the following condition is satisfied: a 1 x 1 + a 2 x 2+,..., a b x b = 0 (3) where a 1,..., a b are constants such that not all of them are zero simultaneously. In case of quasi-multicollinearity, the x variables are intercorrelated but not perfectly: a 1 x 1 + a 2 x 2+,..., a b x b + ν i = 0 (4) where ν i is a stochastic error term. 64 / 89

65 Regression diagnostics The multicollinearity problem Multicollinearity If multicollinearity is perfect in the sense of (3), the inverse of matrix X T X does not exist the regression coefficients cannot be estimated. If multicollinearity is less than perfect, as in (4), the regression coefficients, although determinate, posses large standard errors the regression coefficients cannot be estimated with great precision. 65 / 89

66 Regression diagnostics Consequences of multicollinearity Multicollinearity Although BLUE, the OLS estimators posses large standard errors, which means the coefficients cannot be estimated with great precision. Because of large standard errors, the confidence interval tend to be larger. Because of large standard errors, the t ratio of one or more regression coefficient tends to be statistically insignificant. Although the t ratio of one or more regression coefficient is statistically insignificant, the R 2 overall measure of goodness of fit can be very high. The OLS estimators and their standard errors can be sensitive to small changes in the data. 66 / 89

67 Regression diagnostics Detection of multicollinearity: the VIF index Multicollinearity One may regress each of the x j variables on remaining x variables and find out the corresponding coefficients of determination Rj 2. A high Rj 2 would suggest that x j is highly correlated with the rest of the x s. Thus one may drop from x j the model. The coefficients of determination Rj 2 are also important for making the Variance Inflation Factors (VIF j ) that measure the inflation in the variances of regression coefficients when we get off the ideal case (orthogonal regressors). 1 VIF j = 1 Rj 2 (5) The larger is the value of VIF j, the more collinear is the variable x j. As a rule of thumb, if the VIF j > 10, that variable is said to be highly collinear. 67 / 89

68 Regression diagnostics Detection of multicollinearity: the CN index Multicollinearity The condition number is defined as: CN = λmax λ min (6) where λ max is the maximum eigenvalue of (Z T Z), i.e., the correlation matrix of the independent variables, and λ min is the minimum eigenvalue. The condition index is defined as: CI = λmax λ min = CN (7) Rule of thumb If CN is between 100 and 1000 there is moderate to strong multicollinearity and if it exceeds 1000 there is severe multicollinearity. If the CI is between 10 and 30, there is moderate to strong multicollinearity and if it exceeds 30 there is severe multicollinearity. 68 / 89

69 Regression diagnostics Multicollinearity Example: Longley s Economic Regression Data A macroeconomic data set which provides a well-known example for a highly collinear regression: 7 economical variables, observed yearly from 1947 to 1962 (n=16) 2. Label Variables GNP.deflator GNP implicit price deflator (1954 = 100) GNP Gross National Product Unemployed number of unemployed Armed.Forces number of people in the armed forces Population noninstitutionalized population >= 14 years of age Year the year (time) Employed number of people employed 69 / 89

70 Regression diagnostics Multicollinearity Example: Longley s Economic Regression Data The model: Employed = β 0 + β 1 GNP.deflator + β 2 GNP + β 3 Unemployed = β 4 Armed.Forces + β 5 Population + β 6 Year + β 7 Employed 70 / 89

71 Regression diagnostics Multicollinearity Example: Longley s Economic Regression Data The model: Employed = β 0 + β 1 GNP.deflator + β 2 GNP + β 3 Unemployed = β 4 Armed.Forces + β 5 Population + β 6 Year + β 7 Employed 71 / 89

72 Regression diagnostics Multicollinearity Example: Longley s Economic Regression Data Eigenvalues of (X T X ): e + 07; e + 05; e + 05; e + 04; e + 01; e / 89

73 Regression diagnostics Multicollinearity Example: Longley s Economic Regression Data Condition numbers: ; ; ; ; ; a a Other condition numbers are also worth considering because they indicate whether more than just one independent linear combination is to blame. 73 / 89

74 Regression diagnostics Multicollinearity Example: Longley s Economic Regression Data VIF: ; ; ; ; ; a a The VIF for orthogonal predictors is / 89

75 Categorical predictors 1 Basic framework Model specification and assumptions Parameter estimation: least squares method Coefficient of determination R 2 Properties of the least squares estimators Hypothesis testing on regression coefficients 2 Regression diagnostics Residuals Influential observations and leverage points Multicollinearity 3 Categorical predictors Dummy variable coding 75 / 89

76 Categorical predictors Including categorical predictors Predictors that are qualitative in nature, like for example Gender, are sometimes called categorical or factors. The strategy is to incorporate the qualitative predictors within the y = xβ + ɛ framework. We can then use the estimation, inferential and diagnostic techniques that we have already learnt. Dummy coding Dummy coding is a way of representing groups of people using only zeros and ones. To do it, we have to create several variables; in fact, the number of variables we need is one less than the number of groups we re recoding. 76 / 89

77 Categorical predictors Dummy variable coding Dummy variable coding 1 Count the number of groups you want to recode and subtract 1. 2 Create as many new variables as the value you calculated in step 1. These are your dummy variables. 3 Choose one of your groups as a baseline (i.e., a group against which all other groups should be compared). This should usually be a control group, or, the group that represents the majority of people. 4 Having chosen a baseline group, assign that group values of 0 for all of your dummy variables. 5 For your first dummy variable, assign the value 1 to the first group that you want to compare against the baseline group. Assign all other groups 0 for this variable. 6 For the second dummy variable assign the value 1 to the second group that you want to compare against the baseline group. Assign all other groups 0 for this variable. 7 Repeat this until you run out of dummy variables. 8 Place all of your dummy variables into the regression analysis! 77 / 89

78 Categorical predictors Dummy variable coding: example Dummy variable coding Consider a 4 level factor that will be coded using 3 dummy variables. This table describes the coding that treats level one as the standard level to which all other levels are compared: There are other choices of coding: the choice of coding does not affect the R 2, σ 2 and overall F -statistic. It does effect the ˆβ and you do need to know what the coding is before making conclusions about ˆβ. 78 / 89

79 Categorical predictors Different models Dummy variable coding Consider a regression model that describes the relationship between the dependent variable y and two predictors, a continuous X and a categorical C with two levels (two groups): 1 The same regression line for both groups: y = β 0 + β 1 X + ɛ 2 Separate regression lines for each group but same slope: y = β 0 + β 1 X + β 2 C + ɛ 3 Separate regression lines for each group but same intercept: y = β 0 + β 1 X + β 2 X C + ɛ 4 Separate regression lines for each group: y = β 0 + β 1 X + β 2 C + β 3 X C + ɛ 79 / 89

80 Categorical predictors Different models Dummy variable coding Consider a regression model that describes the relationship between the dependent variable y and two predictors, a continuous X and a categorical C with two levels (two groups): 1 The same regression line for both groups: y = β 0 + β 1 X + ɛ The categorical predictor C is not statistically significant (it has no effect on y), so X is included as the only predictor. 80 / 89

81 Categorical predictors Different models Dummy variable coding Consider a regression model that describes the relationship between the dependent variable y and two predictors, a continuous X and a categorical C with two levels (two groups): 2 Separate regression lines for each group but same slope 3 : y = β 0 + β 1 X + β 2 C + ɛ The categorical predictor C has an effect on the y response variable, so X and C are included as predictors in the model. 81 / 89

82 Categorical predictors Different models Dummy variable coding Consider a regression model that describes the relationship between the dependent variable y and two predictors, a continuous X and a categorical C with two levels (two groups): 3 Separate regression lines for each group but same intercept 4 : y = β 0 + β 1 X + β 2 X C + ɛ The categorical predictor C has effect on the y response variable only through its interaction with the continuous predictor X (the interaction is indicated by X C), so X and X C are included as predictors in the model. 82 / 89

83 Categorical predictors Different models Dummy variable coding Consider a regression model that describes the relationship between the dependent variable y and two predictors, a continuous X and a categorical C with two levels (two groups): 4 Separate regression lines for each group 5 : y = β 0 + β 1 X + β 2 C + β 3 X C + ɛ The categorical predictor C has an effect on the y response variable taken individually that through its interaction with the continuous predictor X (the interaction is indicated by X C), then X, C and X C are included as predictors in the model. 83 / 89

84 Categorical predictors A two-level example Dummy variable coding Annual Consumption and Income in the United States during the period: Year Income Consumption / 89

85 Categorical predictors A two-level example Dummy variable coding The graph shows that there are 4 points (associated with ) where consumption is well below the hypothetical regression line fitted for the remaining data. 85 / 89

86 Categorical predictors A two-level example Dummy variable coding Year Income Consumption War Consumption = β 0 + β 1 Income + β 2 War + ɛ 86 / 89

87 Categorical predictors A two-level example Dummy variable coding Estimate Std. Error t value Pr(> t ) Intercept Income E-06 War E-05 y w=0 = X y w=1 = ( ( )) X = X The effect of the categorical predictor (War) is to decrease the theoretical estimate of the amount of consumption for the years , of an amount of / 89

88 Categorical predictors A two-level example Dummy variable coding y w=0 = X y w=1 = X 88 / 89

89 References Categorical predictors Dummy variable coding 1 Searle, S.R. (1971). Linear Models, Wiley. 2 Wooldridge, J. (2013). Introductory Econometrics, Wiley. 3 Faraway, J.J. (2005). Linear Models with R, Chapman & Hall/CRC. 4 Weisberg, S. (2005). Applied Linear Regression, Wiley. 5 Riani, M. and Laurini, F. (2008). Modelli statistici per l economia con applicazioni aziendali, Pitagora Editrice Bologna. 6 Jobson, J.D. (1991). Applied Multivariate Data Analysis Vol I: Regression and experimental design, Springer 89 / 89

Business Statistics. Tommaso Proietti. Linear Regression. DEF - Università di Roma 'Tor Vergata'

Business Statistics. Tommaso Proietti. Linear Regression. DEF - Università di Roma 'Tor Vergata' Business Statistics Tommaso Proietti DEF - Università di Roma 'Tor Vergata' Linear Regression Specication Let Y be a univariate quantitative response variable. We model Y as follows: Y = f(x) + ε where

More information

Linear Regression. In this problem sheet, we consider the problem of linear regression with p predictors and one intercept,

Linear Regression. In this problem sheet, we consider the problem of linear regression with p predictors and one intercept, Linear Regression In this problem sheet, we consider the problem of linear regression with p predictors and one intercept, y = Xβ + ɛ, where y t = (y 1,..., y n ) is the column vector of target values,

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

Linear Regression. September 27, Chapter 3. Chapter 3 September 27, / 77

Linear Regression. September 27, Chapter 3. Chapter 3 September 27, / 77 Linear Regression Chapter 3 September 27, 2016 Chapter 3 September 27, 2016 1 / 77 1 3.1. Simple linear regression 2 3.2 Multiple linear regression 3 3.3. The least squares estimation 4 3.4. The statistical

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

Econometrics I KS. Module 2: Multivariate Linear Regression. Alexander Ahammer. This version: April 16, 2018

Econometrics I KS. Module 2: Multivariate Linear Regression. Alexander Ahammer. This version: April 16, 2018 Econometrics I KS Module 2: Multivariate Linear Regression Alexander Ahammer Department of Economics Johannes Kepler University of Linz This version: April 16, 2018 Alexander Ahammer (JKU) Module 2: Multivariate

More information

The Simple Linear Regression Model

The Simple Linear Regression Model The Simple Linear Regression Model Lesson 3 Ryan Safner 1 1 Department of Economics Hood College ECON 480 - Econometrics Fall 2017 Ryan Safner (Hood College) ECON 480 - Lesson 3 Fall 2017 1 / 77 Bivariate

More information

Lecture 4: Regression Analysis

Lecture 4: Regression Analysis Lecture 4: Regression Analysis 1 Regression Regression is a multivariate analysis, i.e., we are interested in relationship between several variables. For corporate audience, it is sufficient to show correlation.

More information

UNIVERSITY OF MASSACHUSETTS. Department of Mathematics and Statistics. Basic Exam - Applied Statistics. Tuesday, January 17, 2017

UNIVERSITY OF MASSACHUSETTS. Department of Mathematics and Statistics. Basic Exam - Applied Statistics. Tuesday, January 17, 2017 UNIVERSITY OF MASSACHUSETTS Department of Mathematics and Statistics Basic Exam - Applied Statistics Tuesday, January 17, 2017 Work all problems 60 points are needed to pass at the Masters Level and 75

More information

Day 4: Shrinkage Estimators

Day 4: Shrinkage Estimators Day 4: Shrinkage Estimators Kenneth Benoit Data Mining and Statistical Learning March 9, 2015 n versus p (aka k) Classical regression framework: n > p. Without this inequality, the OLS coefficients have

More information

Analisi Statistica per le Imprese

Analisi Statistica per le Imprese , Analisi Statistica per le Imprese Dip. di Economia Politica e Statistica 4.3. 1 / 33 You should be able to:, Underst model building using multiple regression analysis Apply multiple regression analysis

More information

ECON 4230 Intermediate Econometric Theory Exam

ECON 4230 Intermediate Econometric Theory Exam ECON 4230 Intermediate Econometric Theory Exam Multiple Choice (20 pts). Circle the best answer. 1. The Classical assumption of mean zero errors is satisfied if the regression model a) is linear in the

More information

Hypothesis testing Goodness of fit Multicollinearity Prediction. Applied Statistics. Lecturer: Serena Arima

Hypothesis testing Goodness of fit Multicollinearity Prediction. Applied Statistics. Lecturer: Serena Arima Applied Statistics Lecturer: Serena Arima Hypothesis testing for the linear model Under the Gauss-Markov assumptions and the normality of the error terms, we saw that β N(β, σ 2 (X X ) 1 ) and hence s

More information

Multiple linear regression S6

Multiple linear regression S6 Basic medical statistics for clinical and experimental research Multiple linear regression S6 Katarzyna Jóźwiak k.jozwiak@nki.nl November 15, 2017 1/42 Introduction Two main motivations for doing multiple

More information

CHAPTER 2: Assumptions and Properties of Ordinary Least Squares, and Inference in the Linear Regression Model

CHAPTER 2: Assumptions and Properties of Ordinary Least Squares, and Inference in the Linear Regression Model CHAPTER 2: Assumptions and Properties of Ordinary Least Squares, and Inference in the Linear Regression Model Prof. Alan Wan 1 / 57 Table of contents 1. Assumptions in the Linear Regression Model 2 / 57

More information

Multiple Regression Analysis

Multiple Regression Analysis Chapter 4 Multiple Regression Analysis The simple linear regression covered in Chapter 2 can be generalized to include more than one variable. Multiple regression analysis is an extension of the simple

More information

Contents. 1 Review of Residuals. 2 Detecting Outliers. 3 Influential Observations. 4 Multicollinearity and its Effects

Contents. 1 Review of Residuals. 2 Detecting Outliers. 3 Influential Observations. 4 Multicollinearity and its Effects Contents 1 Review of Residuals 2 Detecting Outliers 3 Influential Observations 4 Multicollinearity and its Effects W. Zhou (Colorado State University) STAT 540 July 6th, 2015 1 / 32 Model Diagnostics:

More information

Applied Statistics and Econometrics

Applied Statistics and Econometrics Applied Statistics and Econometrics Lecture 6 Saul Lach September 2017 Saul Lach () Applied Statistics and Econometrics September 2017 1 / 53 Outline of Lecture 6 1 Omitted variable bias (SW 6.1) 2 Multiple

More information

Multiple Regression. Midterm results: AVG = 26.5 (88%) A = 27+ B = C =

Multiple Regression. Midterm results: AVG = 26.5 (88%) A = 27+ B = C = Economics 130 Lecture 6 Midterm Review Next Steps for the Class Multiple Regression Review & Issues Model Specification Issues Launching the Projects!!!!! Midterm results: AVG = 26.5 (88%) A = 27+ B =

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

Lecture 3: Multiple Regression

Lecture 3: Multiple Regression Lecture 3: Multiple Regression R.G. Pierse 1 The General Linear Model Suppose that we have k explanatory variables Y i = β 1 + β X i + β 3 X 3i + + β k X ki + u i, i = 1,, n (1.1) or Y i = β j X ji + u

More information

401 Review. 6. Power analysis for one/two-sample hypothesis tests and for correlation analysis.

401 Review. 6. Power analysis for one/two-sample hypothesis tests and for correlation analysis. 401 Review Major topics of the course 1. Univariate analysis 2. Bivariate analysis 3. Simple linear regression 4. Linear algebra 5. Multiple regression analysis Major analysis methods 1. Graphical analysis

More information

Multiple Regression Analysis. Part III. Multiple Regression Analysis

Multiple Regression Analysis. Part III. Multiple Regression Analysis Part III Multiple Regression Analysis As of Sep 26, 2017 1 Multiple Regression Analysis Estimation Matrix form Goodness-of-Fit R-square Adjusted R-square Expected values of the OLS estimators Irrelevant

More information

Introduction to Estimation Methods for Time Series models. Lecture 1

Introduction to Estimation Methods for Time Series models. Lecture 1 Introduction to Estimation Methods for Time Series models Lecture 1 Fulvio Corsi SNS Pisa Fulvio Corsi Introduction to Estimation () Methods for Time Series models Lecture 1 SNS Pisa 1 / 19 Estimation

More information

13 Simple Linear Regression

13 Simple Linear Regression B.Sc./Cert./M.Sc. Qualif. - Statistics: Theory and Practice 3 Simple Linear Regression 3. An industrial example A study was undertaken to determine the effect of stirring rate on the amount of impurity

More information

y response variable x 1, x 2,, x k -- a set of explanatory variables

y response variable x 1, x 2,, x k -- a set of explanatory variables 11. Multiple Regression and Correlation y response variable x 1, x 2,, x k -- a set of explanatory variables In this chapter, all variables are assumed to be quantitative. Chapters 12-14 show how to incorporate

More information

14 Multiple Linear Regression

14 Multiple Linear Regression B.Sc./Cert./M.Sc. Qualif. - Statistics: Theory and Practice 14 Multiple Linear Regression 14.1 The multiple linear regression model In simple linear regression, the response variable y is expressed in

More information

Contest Quiz 3. Question Sheet. In this quiz we will review concepts of linear regression covered in lecture 2.

Contest Quiz 3. Question Sheet. In this quiz we will review concepts of linear regression covered in lecture 2. Updated: November 17, 2011 Lecturer: Thilo Klein Contact: tk375@cam.ac.uk Contest Quiz 3 Question Sheet In this quiz we will review concepts of linear regression covered in lecture 2. NOTE: Please round

More information

Analysing data: regression and correlation S6 and S7

Analysing data: regression and correlation S6 and S7 Basic medical statistics for clinical and experimental research Analysing data: regression and correlation S6 and S7 K. Jozwiak k.jozwiak@nki.nl 2 / 49 Correlation So far we have looked at the association

More information

LECTURE 10. Introduction to Econometrics. Multicollinearity & Heteroskedasticity

LECTURE 10. Introduction to Econometrics. Multicollinearity & Heteroskedasticity LECTURE 10 Introduction to Econometrics Multicollinearity & Heteroskedasticity November 22, 2016 1 / 23 ON PREVIOUS LECTURES We discussed the specification of a regression equation Specification consists

More information

Ref.: Spring SOS3003 Applied data analysis for social science Lecture note

Ref.:   Spring SOS3003 Applied data analysis for social science Lecture note SOS3003 Applied data analysis for social science Lecture note 05-2010 Erling Berge Department of sociology and political science NTNU Spring 2010 Erling Berge 2010 1 Literature Regression criticism I Hamilton

More information

Psychology Seminar Psych 406 Dr. Jeffrey Leitzel

Psychology Seminar Psych 406 Dr. Jeffrey Leitzel Psychology Seminar Psych 406 Dr. Jeffrey Leitzel Structural Equation Modeling Topic 1: Correlation / Linear Regression Outline/Overview Correlations (r, pr, sr) Linear regression Multiple regression interpreting

More information

x 21 x 22 x 23 f X 1 X 2 X 3 ε

x 21 x 22 x 23 f X 1 X 2 X 3 ε Chapter 2 Estimation 2.1 Example Let s start with an example. Suppose that Y is the fuel consumption of a particular model of car in m.p.g. Suppose that the predictors are 1. X 1 the weight of the car

More information

Machine Learning for OR & FE

Machine Learning for OR & FE Machine Learning for OR & FE Supervised Learning: Regression I Martin Haugh Department of Industrial Engineering and Operations Research Columbia University Email: martin.b.haugh@gmail.com Some of the

More information

Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data

Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data July 2012 Bangkok, Thailand Cosimo Beverelli (World Trade Organization) 1 Content a) Classical regression model b)

More information

405 ECONOMETRICS Chapter # 11: MULTICOLLINEARITY: WHAT HAPPENS IF THE REGRESSORS ARE CORRELATED? Domodar N. Gujarati

405 ECONOMETRICS Chapter # 11: MULTICOLLINEARITY: WHAT HAPPENS IF THE REGRESSORS ARE CORRELATED? Domodar N. Gujarati 405 ECONOMETRICS Chapter # 11: MULTICOLLINEARITY: WHAT HAPPENS IF THE REGRESSORS ARE CORRELATED? Domodar N. Gujarati Prof. M. El-Sakka Dept of Economics Kuwait University In this chapter we take a critical

More information

Regression Analysis for Data Containing Outliers and High Leverage Points

Regression Analysis for Data Containing Outliers and High Leverage Points Alabama Journal of Mathematics 39 (2015) ISSN 2373-0404 Regression Analysis for Data Containing Outliers and High Leverage Points Asim Kumer Dey Department of Mathematics Lamar University Md. Amir Hossain

More information

Glossary. The ISI glossary of statistical terms provides definitions in a number of different languages:

Glossary. The ISI glossary of statistical terms provides definitions in a number of different languages: Glossary The ISI glossary of statistical terms provides definitions in a number of different languages: http://isi.cbs.nl/glossary/index.htm Adjusted r 2 Adjusted R squared measures the proportion of the

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

ACE 564 Spring Lecture 8. Violations of Basic Assumptions I: Multicollinearity and Non-Sample Information. by Professor Scott H.

ACE 564 Spring Lecture 8. Violations of Basic Assumptions I: Multicollinearity and Non-Sample Information. by Professor Scott H. ACE 564 Spring 2006 Lecture 8 Violations of Basic Assumptions I: Multicollinearity and Non-Sample Information by Professor Scott H. Irwin Readings: Griffiths, Hill and Judge. "Collinear Economic Variables,

More information

Lectures 5 & 6: Hypothesis Testing

Lectures 5 & 6: Hypothesis Testing Lectures 5 & 6: Hypothesis Testing in which you learn to apply the concept of statistical significance to OLS estimates, learn the concept of t values, how to use them in regression work and come across

More information

Lecture 5: Omitted Variables, Dummy Variables and Multicollinearity

Lecture 5: Omitted Variables, Dummy Variables and Multicollinearity Lecture 5: Omitted Variables, Dummy Variables and Multicollinearity R.G. Pierse 1 Omitted Variables Suppose that the true model is Y i β 1 + β X i + β 3 X 3i + u i, i 1,, n (1.1) where β 3 0 but that the

More information

Quantitative Methods I: Regression diagnostics

Quantitative Methods I: Regression diagnostics Quantitative Methods I: Regression University College Dublin 10 December 2014 1 Assumptions and errors 2 3 4 Outline Assumptions and errors 1 Assumptions and errors 2 3 4 Assumptions: specification Linear

More information

9. Linear Regression and Correlation

9. Linear Regression and Correlation 9. Linear Regression and Correlation Data: y a quantitative response variable x a quantitative explanatory variable (Chap. 8: Recall that both variables were categorical) For example, y = annual income,

More information

2. Linear regression with multiple regressors

2. Linear regression with multiple regressors 2. Linear regression with multiple regressors Aim of this section: Introduction of the multiple regression model OLS estimation in multiple regression Measures-of-fit in multiple regression Assumptions

More information

Regression With a Categorical Independent Variable

Regression With a Categorical Independent Variable Regression ith a Independent Variable ERSH 8320 Slide 1 of 34 Today s Lecture Regression with a single categorical independent variable. Today s Lecture Coding procedures for analysis. Dummy coding. Relationship

More information

Math 423/533: The Main Theoretical Topics

Math 423/533: The Main Theoretical Topics Math 423/533: The Main Theoretical Topics Notation sample size n, data index i number of predictors, p (p = 2 for simple linear regression) y i : response for individual i x i = (x i1,..., x ip ) (1 p)

More information

L7: Multicollinearity

L7: Multicollinearity L7: Multicollinearity Feng Li feng.li@cufe.edu.cn School of Statistics and Mathematics Central University of Finance and Economics Introduction ï Example Whats wrong with it? Assume we have this data Y

More information

Empirical Economic Research, Part II

Empirical Economic Research, Part II Based on the text book by Ramanathan: Introductory Econometrics Robert M. Kunst robert.kunst@univie.ac.at University of Vienna and Institute for Advanced Studies Vienna December 7, 2011 Outline Introduction

More information

Trendlines Simple Linear Regression Multiple Linear Regression Systematic Model Building Practical Issues

Trendlines Simple Linear Regression Multiple Linear Regression Systematic Model Building Practical Issues Trendlines Simple Linear Regression Multiple Linear Regression Systematic Model Building Practical Issues Overfitting Categorical Variables Interaction Terms Non-linear Terms Linear Logarithmic y = a +

More information

Statistics - Lecture Three. Linear Models. Charlotte Wickham 1.

Statistics - Lecture Three. Linear Models. Charlotte Wickham   1. Statistics - Lecture Three Charlotte Wickham wickham@stat.berkeley.edu http://www.stat.berkeley.edu/~wickham/ Linear Models 1. The Theory 2. Practical Use 3. How to do it in R 4. An example 5. Extensions

More information

Regression Analysis. BUS 735: Business Decision Making and Research. Learn how to detect relationships between ordinal and categorical variables.

Regression Analysis. BUS 735: Business Decision Making and Research. Learn how to detect relationships between ordinal and categorical variables. Regression Analysis BUS 735: Business Decision Making and Research 1 Goals of this section Specific goals Learn how to detect relationships between ordinal and categorical variables. Learn how to estimate

More information

Multiple Linear Regression

Multiple Linear Regression Andrew Lonardelli December 20, 2013 Multiple Linear Regression 1 Table Of Contents Introduction: p.3 Multiple Linear Regression Model: p.3 Least Squares Estimation of the Parameters: p.4-5 The matrix approach

More information

Linear models and their mathematical foundations: Simple linear regression

Linear models and their mathematical foundations: Simple linear regression Linear models and their mathematical foundations: Simple linear regression Steffen Unkel Department of Medical Statistics University Medical Center Göttingen, Germany Winter term 2018/19 1/21 Introduction

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

Ch 3: Multiple Linear Regression

Ch 3: Multiple Linear Regression Ch 3: Multiple Linear Regression 1. Multiple Linear Regression Model Multiple regression model has more than one regressor. For example, we have one response variable and two regressor variables: 1. delivery

More information

1 Least Squares Estimation - multiple regression.

1 Least Squares Estimation - multiple regression. Introduction to multiple regression. Fall 2010 1 Least Squares Estimation - multiple regression. Let y = {y 1,, y n } be a n 1 vector of dependent variable observations. Let β = {β 0, β 1 } be the 2 1

More information

REED TUTORIALS (Pty) LTD ECS3706 EXAM PACK

REED TUTORIALS (Pty) LTD ECS3706 EXAM PACK REED TUTORIALS (Pty) LTD ECS3706 EXAM PACK 1 ECONOMETRICS STUDY PACK MAY/JUNE 2016 Question 1 (a) (i) Describing economic reality (ii) Testing hypothesis about economic theory (iii) Forecasting future

More information

Prepared by: Prof. Dr Bahaman Abu Samah Department of Professional Development and Continuing Education Faculty of Educational Studies Universiti

Prepared by: Prof. Dr Bahaman Abu Samah Department of Professional Development and Continuing Education Faculty of Educational Studies Universiti Prepared by: Prof Dr Bahaman Abu Samah Department of Professional Development and Continuing Education Faculty of Educational Studies Universiti Putra Malaysia Serdang M L Regression is an extension to

More information

ECO220Y Simple Regression: Testing the Slope

ECO220Y Simple Regression: Testing the Slope ECO220Y Simple Regression: Testing the Slope Readings: Chapter 18 (Sections 18.3-18.5) Winter 2012 Lecture 19 (Winter 2012) Simple Regression Lecture 19 1 / 32 Simple Regression Model y i = β 0 + β 1 x

More information

Lecture 1: OLS derivations and inference

Lecture 1: OLS derivations and inference Lecture 1: OLS derivations and inference Econometric Methods Warsaw School of Economics (1) OLS 1 / 43 Outline 1 Introduction Course information Econometrics: a reminder Preliminary data exploration 2

More information

Final Exam - Solutions

Final Exam - Solutions Ecn 102 - Analysis of Economic Data University of California - Davis March 19, 2010 Instructor: John Parman Final Exam - Solutions You have until 5:30pm to complete this exam. Please remember to put your

More information

Linear Models 1. Isfahan University of Technology Fall Semester, 2014

Linear Models 1. Isfahan University of Technology Fall Semester, 2014 Linear Models 1 Isfahan University of Technology Fall Semester, 2014 References: [1] G. A. F., Seber and A. J. Lee (2003). Linear Regression Analysis (2nd ed.). Hoboken, NJ: Wiley. [2] A. C. Rencher and

More information

Unit 6 - Introduction to linear regression

Unit 6 - Introduction to linear regression Unit 6 - Introduction to linear regression Suggested reading: OpenIntro Statistics, Chapter 7 Suggested exercises: Part 1 - Relationship between two numerical variables: 7.7, 7.9, 7.11, 7.13, 7.15, 7.25,

More information

Review of Econometrics

Review of Econometrics Review of Econometrics Zheng Tian June 5th, 2017 1 The Essence of the OLS Estimation Multiple regression model involves the models as follows Y i = β 0 + β 1 X 1i + β 2 X 2i + + β k X ki + u i, i = 1,...,

More information

WISE International Masters

WISE International Masters WISE International Masters ECONOMETRICS Instructor: Brett Graham INSTRUCTIONS TO STUDENTS 1 The time allowed for this examination paper is 2 hours. 2 This examination paper contains 32 questions. You are

More information

, (1) e i = ˆσ 1 h ii. c 2016, Jeffrey S. Simonoff 1

, (1) e i = ˆσ 1 h ii. c 2016, Jeffrey S. Simonoff 1 Regression diagnostics As is true of all statistical methodologies, linear regression analysis can be a very effective way to model data, as along as the assumptions being made are true. For the regression

More information

The Model Building Process Part I: Checking Model Assumptions Best Practice

The Model Building Process Part I: Checking Model Assumptions Best Practice The Model Building Process Part I: Checking Model Assumptions Best Practice Authored by: Sarah Burke, PhD 31 July 2017 The goal of the STAT T&E COE is to assist in developing rigorous, defensible test

More information

Multiple Linear Regression

Multiple Linear Regression Multiple 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

CHAPTER 6: SPECIFICATION VARIABLES

CHAPTER 6: SPECIFICATION VARIABLES Recall, we had the following six assumptions required for the Gauss-Markov Theorem: 1. The regression model is linear, correctly specified, and has an additive error term. 2. The error term has a zero

More information

Business Economics BUSINESS ECONOMICS. PAPER No. : 8, FUNDAMENTALS OF ECONOMETRICS MODULE No. : 3, GAUSS MARKOV THEOREM

Business Economics BUSINESS ECONOMICS. PAPER No. : 8, FUNDAMENTALS OF ECONOMETRICS MODULE No. : 3, GAUSS MARKOV THEOREM Subject Business Economics Paper No and Title Module No and Title Module Tag 8, Fundamentals of Econometrics 3, The gauss Markov theorem BSE_P8_M3 1 TABLE OF CONTENTS 1. INTRODUCTION 2. ASSUMPTIONS OF

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

Regression Review. Statistics 149. Spring Copyright c 2006 by Mark E. Irwin

Regression Review. Statistics 149. Spring Copyright c 2006 by Mark E. Irwin Regression Review Statistics 149 Spring 2006 Copyright c 2006 by Mark E. Irwin Matrix Approach to Regression Linear Model: Y i = β 0 + β 1 X i1 +... + β p X ip + ɛ i ; ɛ i iid N(0, σ 2 ), i = 1,..., n

More information

Machine Learning Linear Regression. Prof. Matteo Matteucci

Machine Learning Linear Regression. Prof. Matteo Matteucci Machine Learning Linear Regression Prof. Matteo Matteucci Outline 2 o Simple Linear Regression Model Least Squares Fit Measures of Fit Inference in Regression o Multi Variate Regession Model Least Squares

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

Single and multiple linear regression analysis

Single and multiple linear regression analysis Single and multiple linear regression analysis Marike Cockeran 2017 Introduction Outline of the session Simple linear regression analysis SPSS example of simple linear regression analysis Additional topics

More information

Linear Regression with 1 Regressor. Introduction to Econometrics Spring 2012 Ken Simons

Linear Regression with 1 Regressor. Introduction to Econometrics Spring 2012 Ken Simons Linear Regression with 1 Regressor Introduction to Econometrics Spring 2012 Ken Simons Linear Regression with 1 Regressor 1. The regression equation 2. Estimating the equation 3. Assumptions required for

More information

The Model Building Process Part I: Checking Model Assumptions Best Practice (Version 1.1)

The Model Building Process Part I: Checking Model Assumptions Best Practice (Version 1.1) The Model Building Process Part I: Checking Model Assumptions Best Practice (Version 1.1) Authored by: Sarah Burke, PhD Version 1: 31 July 2017 Version 1.1: 24 October 2017 The goal of the STAT T&E COE

More information

STOCKHOLM UNIVERSITY Department of Economics Course name: Empirical Methods Course code: EC40 Examiner: Lena Nekby Number of credits: 7,5 credits Date of exam: Friday, June 5, 009 Examination time: 3 hours

More information

MULTIPLE REGRESSION AND ISSUES IN REGRESSION ANALYSIS

MULTIPLE REGRESSION AND ISSUES IN REGRESSION ANALYSIS MULTIPLE REGRESSION AND ISSUES IN REGRESSION ANALYSIS Page 1 MSR = Mean Regression Sum of Squares MSE = Mean Squared Error RSS = Regression Sum of Squares SSE = Sum of Squared Errors/Residuals α = Level

More information

Making sense of Econometrics: Basics

Making sense of Econometrics: Basics Making sense of Econometrics: Basics Lecture 4: Qualitative influences and Heteroskedasticity Egypt Scholars Economic Society November 1, 2014 Assignment & feedback enter classroom at http://b.socrative.com/login/student/

More information

Making sense of Econometrics: Basics

Making sense of Econometrics: Basics Making sense of Econometrics: Basics Lecture 7: Multicollinearity Egypt Scholars Economic Society November 22, 2014 Assignment & feedback Multicollinearity enter classroom at room name c28efb78 http://b.socrative.com/login/student/

More information

The regression model with one fixed regressor cont d

The regression model with one fixed regressor cont d The regression model with one fixed regressor cont d 3150/4150 Lecture 4 Ragnar Nymoen 27 January 2012 The model with transformed variables Regression with transformed variables I References HGL Ch 2.8

More information

Unit 6 - Simple linear regression

Unit 6 - Simple linear regression Sta 101: Data Analysis and Statistical Inference Dr. Çetinkaya-Rundel Unit 6 - Simple linear regression LO 1. Define the explanatory variable as the independent variable (predictor), and the response variable

More information

Regression diagnostics

Regression diagnostics Regression diagnostics Kerby Shedden Department of Statistics, University of Michigan November 5, 018 1 / 6 Motivation When working with a linear model with design matrix X, the conventional linear model

More information

Econ 510 B. Brown Spring 2014 Final Exam Answers

Econ 510 B. Brown Spring 2014 Final Exam Answers Econ 510 B. Brown Spring 2014 Final Exam Answers Answer five of the following questions. You must answer question 7. The question are weighted equally. You have 2.5 hours. You may use a calculator. Brevity

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

STAT 540: Data Analysis and Regression

STAT 540: Data Analysis and Regression STAT 540: Data Analysis and Regression Wen Zhou http://www.stat.colostate.edu/~riczw/ Email: riczw@stat.colostate.edu Department of Statistics Colorado State University Fall 205 W. Zhou (Colorado State

More information

Appendix A: Review of the General Linear Model

Appendix A: Review of the General Linear Model Appendix A: Review of the General Linear Model The generallinear modelis an important toolin many fmri data analyses. As the name general suggests, this model can be used for many different types of analyses,

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

Chapter 3: Multiple Regression. August 14, 2018

Chapter 3: Multiple Regression. August 14, 2018 Chapter 3: Multiple Regression August 14, 2018 1 The multiple linear regression model The model y = β 0 +β 1 x 1 + +β k x k +ǫ (1) is called a multiple linear regression model with k regressors. The parametersβ

More information

Lecture 18: Simple Linear Regression

Lecture 18: Simple Linear Regression Lecture 18: Simple Linear Regression BIOS 553 Department of Biostatistics University of Michigan Fall 2004 The Correlation Coefficient: r The correlation coefficient (r) is a number that measures the strength

More information

1 Correlation and Inference from Regression

1 Correlation and Inference from Regression 1 Correlation and Inference from Regression Reading: Kennedy (1998) A Guide to Econometrics, Chapters 4 and 6 Maddala, G.S. (1992) Introduction to Econometrics p. 170-177 Moore and McCabe, chapter 12 is

More information

Review of Classical Least Squares. James L. Powell Department of Economics University of California, Berkeley

Review of Classical Least Squares. James L. Powell Department of Economics University of California, Berkeley Review of Classical Least Squares James L. Powell Department of Economics University of California, Berkeley The Classical Linear Model The object of least squares regression methods is to model and estimate

More information

Introduction to Regression

Introduction to Regression Regression Introduction to Regression If two variables covary, we should be able to predict the value of one variable from another. Correlation only tells us how much two variables covary. In regression,

More information

Regression With a Categorical Independent Variable

Regression With a Categorical Independent Variable Regression With a Independent Variable Lecture 10 November 5, 2008 ERSH 8320 Lecture #10-11/5/2008 Slide 1 of 54 Today s Lecture Today s Lecture Chapter 11: Regression with a single categorical independent

More information

Regression Diagnostics Procedures

Regression Diagnostics Procedures Regression Diagnostics Procedures ASSUMPTIONS UNDERLYING REGRESSION/CORRELATION NORMALITY OF VARIANCE IN Y FOR EACH VALUE OF X For any fixed value of the independent variable X, the distribution of the

More information

9 Correlation and Regression

9 Correlation and Regression 9 Correlation and Regression SW, Chapter 12. Suppose we select n = 10 persons from the population of college seniors who plan to take the MCAT exam. Each takes the test, is coached, and then retakes the

More information

3 Multiple Linear Regression

3 Multiple Linear Regression 3 Multiple Linear Regression 3.1 The Model Essentially, all models are wrong, but some are useful. Quote by George E.P. Box. Models are supposed to be exact descriptions of the population, but that is

More information

Rewrap ECON November 18, () Rewrap ECON 4135 November 18, / 35

Rewrap ECON November 18, () Rewrap ECON 4135 November 18, / 35 Rewrap ECON 4135 November 18, 2011 () Rewrap ECON 4135 November 18, 2011 1 / 35 What should you now know? 1 What is econometrics? 2 Fundamental regression analysis 1 Bivariate regression 2 Multivariate

More information