# Statistical Modelling in Stata 5: Linear Models

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Statistical Modelling in Stata 5: Linear Models Mark Lunt Arthritis Research UK Centre for Excellence in Epidemiology University of Manchester 08/11/2016

2 Structure This Week What is a linear model? How good is my model? Does a linear model fit this data? Next Week Categorical Variables Interactions Confounding Other Considerations Variable Selection Polynomial Regression

3 Statistical Models All models are wrong, but some are useful. (G.E.P. Box) A model should be as simple as possible, but no simpler. (attr. Albert Einstein)

4 What is a Linear Model? Introduction Parameters Prediction ANOVA Stata commands for linear models Describes the relationship between variables Assumes that relationship can be described by straight lines Tells you the expected value of an outcome or y variable, given the values of one or more predictor or x variables

5 Variable Names The linear Model Introduction Parameters Prediction ANOVA Stata commands for linear models Outcome Dependent variable Y-variable Response variable Output variable Predictor Independent variables x-variables Regressors Input variables Explanatory variables Carriers Covariates

6 The Equation of a Linear Model Introduction Parameters Prediction ANOVA Stata commands for linear models The equation of a linear model, with outcome Y and predictors x 1,... x p Y = β 0 + β 1 x 1 + β 2 x β p x p + ε β 0 + β 1 x 1 + β 2 x β p x p is the Linear Predictor Ŷ = β 0 + β 1 x 1 + β 2 x β p x p is the predictable part of Y. ε is the error term, the unpredictable part of Y. We assume that ε is normally distributed with mean 0 and variance σ 2.

7 Linear Model Assumptions Introduction Parameters Prediction ANOVA Stata commands for linear models Mean of Y x is a linear function of x Variables Y 1, Y 2... Y n are independent. The variance of Y x is constant. Distribution of Y x is normal.

8 Parameter Interpretation Introduction Parameters Prediction ANOVA Stata commands for linear models Y Y = β0 + β1 x 1 β1 β0 x β 1 is the amount by which Y increases if x 1 increases by 1, and none of the other x variables change. β 0 is the value of Y when all of the x variables are equal to 0.

9 Estimating Parameters Introduction Parameters Prediction ANOVA Stata commands for linear models β j in the previous equation are referred to as parameters or coefficients Don t use the expression beta coefficients : it is ambiguous We need to obtain estimates of them from the data we have collected. Estimates normally given roman letters b 0, b 1,..., b n. Values given to b j are those which minimise (Y Ŷ )2 : hence Least squares estimates

10 Inference on Parameters Introduction Parameters Prediction ANOVA Stata commands for linear models If assumptions hold, sampling distribution of b j is normal with mean β j and variance σ 2 /ns 2 x (for sufficiently large n), where : σ 2 is the variance of the error terms ε, s 2 x is the variance of x j and n is the number of observations Can perform t-tests of hypotheses about β j (e.g. β j = 0). Can also produce a confidence interval for β j. Inference in β 0 (intercept) is usually not interesting.

11 Inference on the Predicted Value Introduction Parameters Prediction ANOVA Stata commands for linear models Y = β 0 + β 1 x β p x p + ε Predicted Value Ŷ = b 0 + b 1 x b p x p Observed values will differ from predicted values because of Random error (ε) Uncertainty about parameters β j. We can calculate a 95% prediction interval, within which we would expect 95% of observations to lie. Reference Range for Y

12 Prediction Interval The linear Model Introduction Parameters Prediction ANOVA Stata commands for linear models Y x1

13 Inference on the Mean Introduction Parameters Prediction ANOVA Stata commands for linear models The mean value of Y at a given value of x does not depend on ε. The standard error of Ŷ is called the standard error of the prediction (by stata). We can calculate a 95% confidence interval for Ŷ. This can be thought of as a confidence region for the regression line.

14 Confidence Interval The linear Model Introduction Parameters Prediction ANOVA Stata commands for linear models Y x1

15 Analysis of Variance (ANOVA) Introduction Parameters Prediction ANOVA Stata commands for linear models Variance of Y is (Y Ȳ) 2 (Y Ŷ) 2 + (Ŷ n 1 = Ȳ)2 n 1 SS reg = ( Ŷ Ȳ ) 2 (regression sum of squares) SS res = ( Y Ŷ ) 2 (residual sum of squares) Each part has associated degrees of freedom: p d.f for the regression, n p 1 for the residual. The mean square MS = SS/df. MS reg should be similar to MS res if no association between Y and x F = MSreg MS res gives a measure of the strength of the association between Y and x.

16 ANOVA Table The linear Model Introduction Parameters Prediction ANOVA Stata commands for linear models Source df Sum of Mean Square F Squares Regression p SS reg MS reg = SS reg p MS reg MS res Residual n-p-1 SS res MS res = SS res (n p 1) Total n-1 SS tot MS tot = SS tot (n 1)

17 Goodness of Fit The linear Model Introduction Parameters Prediction ANOVA Stata commands for linear models Predictive value of a model depends on how much of the variance can be explained. R 2 is the proportion of the variance explained by the model R 2 = SSreg SS tot R 2 always increases when a predictor variable is added Adjusted R 2 is better for comparing models.

18 Introduction Parameters Prediction ANOVA Stata commands for linear models Stata Commands for Linear Models The basic command for linear regression is regress y-var x-vars Can use by and if to select subgroups. The command predict can produce predicted values standard errors residuals etc.

19 Stata Output 1: ANOVA Table Introduction Parameters Prediction ANOVA Stata commands for linear models F() Prob > F R-squared Adj R-squared Root MSE F Statistic for the Hypothesis β j = 0 for all j p-value for above hypothesis test Proportion of variance explained by regression = SS Model SS Total (n 1)R 2 p n p 1 MSResidual = ˆσ

20 Stata Output 1: Example Introduction Parameters Prediction ANOVA Stata commands for linear models Source SS df MS Number of obs = F( 1, 9) = Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE =

21 Stata Output 2: Coefficients Introduction Parameters Prediction ANOVA Stata commands for linear models Coef. Estimate of parameter β for the variable in the left-hand column. (β 0 is labelled _cons for constant ) Std. Err. Standard error of b. b 0 t The value of s.e.(b), to test the hypothesis that β = 0. P > t P-value resulting from the above hypothesis test. 95% Conf. Interval A 95% confidence interval for β.

22 Stata Output 2: Example Introduction Parameters Prediction ANOVA Stata commands for linear models Y Coef. Std. Err. t P> t [95% Conf. Interval] x _cons

23 Constant Variance Linearity Influential points Normality Is a linear model appropriate? Does it provide adequate predictions? Do my data satisfy the assumptions of the linear model? Are there any individual points having an inordinate influence on the model?

24 Anscombe s Data The linear Model Constant Variance Linearity Influential points Normality Y1 Y x x Y3 Y x x2

25 Constant Variance Linearity Influential points Normality Linear Model Assumptions Linear models are based on 4 assumptions Mean of Y i is a linear function of x i. Variables Y 1, Y 2... Y n are independent. The variance of Y i x is constant. Distribution of Y i x is normal. If any of these are incorrect, inference from regression model is unreliable We may know about assumptions from experimental design (e.g. repeated measures on an individual are unlikely to be independent). Should test all 4 assumptions.

26 Distribution of Residuals Constant Variance Linearity Influential points Normality Error term ε i = Y i β 0 + β 1 x 1i + β 2 x 2i β p x pi Residual term e i = Y i b 0 + b 1 x 1i + b 2 x 2i b p x pi = Y i Ŷi Nearly but not quite the same, since our estimates of β j are imperfect. Predicted values vary more at extremes of x-range (points have greater leverage Hence residuals vary less at extremes of the x-range If error terms have constant variance, residuals don t.

27 Constant Variance Linearity Influential points Normality Standardised Residuals Variation in variance of residuals as x changes is predictable. Can therefore correct for it. Standardised Residuals have mean 0 and standard deviation 1. Can use standardised residuals to test assumptions of linear model predict Yhat, xb will generate predicted values predict sres, rstand will generate standardised residuals scatter sres Yhat will produce a plot of the standardised residuals against the fitted values.

28 Testing Constant Variance: Constant Variance Linearity Influential points Normality Residuals should be independent of predicted values There should be no pattern in this plot Common patterns Spread of residuals increases with fitted values This is called heteroskedasticity May be removed by transforming Y Can be formally tested for with hettest There is curvature The association between x and Y variables is not linear May need to transform Y or x Alternatively, fit x 2, x 3 etc. terms Can be formally tested for with ovtest

29 Y x Y x The linear Model Constant Variance Linearity Influential points Normality Residual vs Fitted Value Plot Examples

30 Constant Variance Linearity Influential points Normality Testing Linearity: Partial Residual Plots Partial residual p j = e + b j x j = Y β 0 l j b lx l Formed by subtracting that part of the predicted value that does not depend on x j from the observed value of Y. Plot of p j against x j shows the association between Y and x j after adjusting for the other predictors. Can be obtained from stata by typing cprplot xvar after performing a regression.

31 Example Partial Residual Plot Constant Variance Linearity Influential points Normality 7 Residuals Linear prediction e( Y2 X,x1 ) + b*x x1

32 Constant Variance Linearity Influential points Normality Identifying Outliers Points which have a marked effect on the regression equation are called influential points. Points with unusual x-values are said to have high leverage. Points with high leverage may or may not be influential, depending on their Y values. Plot of studentised residual (residual from regression excluding that point) against leverage can show influential points.

33 Constant Variance Linearity Influential points Normality Statistics to Identify Influential Points DFBETA Measures influence of individual point on a single coefficient β j. DFFITS Measures influence of an individual point on its predicted value. Cook s Distance Measured the influence of an individual point on all predicted values. All can be produced by predict. There are suggested cut-offs to determine influential observations. May be better to simply look for outliers.

34 Constant Variance Linearity Influential points Normality Y -outliers A point with normal x-values and abnormal Y -value may be influential. Robust regression can be used in this case. Observations repeatedly reweighted, weight decreases as magnitude of residual increases Methods robust to x-outliers are very computationally intensive.

35 Robust Regression The linear Model Constant Variance Linearity Influential points Normality 15 Y3 LS Regression Robust Regression Y x1

36 Constant Variance Linearity Influential points Normality Testing Normality Standardised residuals should follow a normal distribution. Can test formally with swilk varname. Can test graphically with qnorm varname.

37 Normal Plot: Example Constant Variance Linearity Influential points Normality Standardised Residuals Inverse Normal Standardised Residuals Inverse Normal Standardized residuals Standardized residuals Inverse Normal Inverse Normal

38 Constant Variance Linearity Influential points Normality Graphical Assessment & Formal Testing Can test assumptions both formally and informally Both approaches have advantages and disadvantages Tests are always significant in sufficiently large samples. Differences may be slight and unimportant. Differences may be marked but non-significant in small samples. Best to use both

### In Chapter 2, we used linear regression to describe linear relationships. The setting for this is a

Math 143 Inference on Regression 1 Review of Linear Regression In Chapter 2, we used linear regression to describe linear relationships. The setting for this is a bivariate data set (i.e., a list of cases/subjects

### MULTIPLE REGRESSION EXAMPLE

MULTIPLE REGRESSION EXAMPLE For a sample of n = 166 college students, the following variables were measured: Y = height X 1 = mother s height ( momheight ) X 2 = father s height ( dadheight ) X 3 = 1 if

### Please follow the directions once you locate the Stata software in your computer. Room 114 (Business Lab) has computers with Stata software

STATA Tutorial Professor Erdinç Please follow the directions once you locate the Stata software in your computer. Room 114 (Business Lab) has computers with Stata software 1.Wald Test Wald Test is used

### Inference for Regression

Simple Linear Regression Inference for Regression The simple linear regression model Estimating regression parameters; Confidence intervals and significance tests for regression parameters Inference about

### where b is the slope of the line and a is the intercept i.e. where the line cuts the y axis.

Least Squares Introduction We have mentioned that one should not always conclude that because two variables are correlated that one variable is causing the other to behave a certain way. However, sometimes

### Using Minitab for Regression Analysis: An extended example

Using Minitab for Regression Analysis: An extended example The following example uses data from another text on fertilizer application and crop yield, and is intended to show how Minitab can be used to

### Soci708 Statistics for Sociologists

Soci708 Statistics for Sociologists Module 11 Multiple Regression 1 François Nielsen University of North Carolina Chapel Hill Fall 2009 1 Adapted from slides for the course Quantitative Methods in Sociology

### A. Karpinski

Chapter 3 Multiple Linear Regression Page 1. Overview of multiple regression 3-2 2. Considering relationships among variables 3-3 3. Extending the simple regression model to multiple predictors 3-4 4.

### REGRESSION LINES IN STATA

REGRESSION LINES IN STATA THOMAS ELLIOTT 1. Introduction to Regression Regression analysis is about eploring linear relationships between a dependent variable and one or more independent variables. Regression

### Simple Linear Regression

Inference for Regression Simple Linear Regression IPS Chapter 10.1 2009 W.H. Freeman and Company Objectives (IPS Chapter 10.1) Simple linear regression Statistical model for linear regression Estimating

### Residuals. Residuals = ª Department of ISM, University of Alabama, ST 260, M23 Residuals & Minitab. ^ e i = y i - y i

A continuation of regression analysis Lesson Objectives Continue to build on regression analysis. Learn how residual plots help identify problems with the analysis. M23-1 M23-2 Example 1: continued Case

### Linear Regression with One Regressor

Linear Regression with One Regressor Michael Ash Lecture 10 Analogy to the Mean True parameter µ Y β 0 and β 1 Meaning Central tendency Intercept and slope E(Y ) E(Y X ) = β 0 + β 1 X Data Y i (X i, Y

### Statistics 112 Regression Cheatsheet Section 1B - Ryan Rosario

Statistics 112 Regression Cheatsheet Section 1B - Ryan Rosario I have found that the best way to practice regression is by brute force That is, given nothing but a dataset and your mind, compute everything

### 1. What is the critical value for this 95% confidence interval? CV = z.025 = invnorm(0.025) = 1.96

1 Final Review 2 Review 2.1 CI 1-propZint Scenario 1 A TV manufacturer claims in its warranty brochure that in the past not more than 10 percent of its TV sets needed any repair during the first two years

### Chapter 7: Simple linear regression Learning Objectives

Chapter 7: Simple linear regression Learning Objectives Reading: Section 7.1 of OpenIntro Statistics Video: Correlation vs. causation, YouTube (2:19) Video: Intro to Linear Regression, YouTube (5:18) -

### Chapter 11: Two Variable Regression Analysis

Department of Mathematics Izmir University of Economics Week 14-15 2014-2015 In this chapter, we will focus on linear models and extend our analysis to relationships between variables, the definitions

### CORRELATION AND SIMPLE REGRESSION ANALYSIS USING SAS IN DAIRY SCIENCE

CORRELATION AND SIMPLE REGRESSION ANALYSIS USING SAS IN DAIRY SCIENCE A. K. Gupta, Vipul Sharma and M. Manoj NDRI, Karnal-132001 When analyzing farm records, simple descriptive statistics can reveal a

### Regression Analysis: A Complete Example

Regression Analysis: A Complete Example This section works out an example that includes all the topics we have discussed so far in this chapter. A complete example of regression analysis. PhotoDisc, Inc./Getty

### Statistics 104 Final Project A Culture of Debt: A Study of Credit Card Spending in America TF: Kevin Rader Anonymous Students: LD, MH, IW, MY

Statistics 104 Final Project A Culture of Debt: A Study of Credit Card Spending in America TF: Kevin Rader Anonymous Students: LD, MH, IW, MY ABSTRACT: This project attempted to determine the relationship

### Data and Regression Analysis. Lecturer: Prof. Duane S. Boning. Rev 10

Data and Regression Analysis Lecturer: Prof. Duane S. Boning Rev 10 1 Agenda 1. Comparison of Treatments (One Variable) Analysis of Variance (ANOVA) 2. Multivariate Analysis of Variance Model forms 3.

### The scatterplot indicates a positive linear relationship between waist size and body fat percentage:

STAT E-150 Statistical Methods Multiple Regression Three percent of a man's body is essential fat, which is necessary for a healthy body. However, too much body fat can be dangerous. For men between the

### IAPRI Quantitative Analysis Capacity Building Series. Multiple regression analysis & interpreting results

IAPRI Quantitative Analysis Capacity Building Series Multiple regression analysis & interpreting results How important is R-squared? R-squared Published in Agricultural Economics 0.45 Best article of the

### 0.1 Multiple Regression Models

0.1 Multiple Regression Models We will introduce the multiple Regression model as a mean of relating one numerical response variable y to two or more independent (or predictor variables. We will see different

### Correlation and Regression

Correlation and Regression Scatterplots Correlation Explanatory and response variables Simple linear regression General Principles of Data Analysis First plot the data, then add numerical summaries Look

### Regression in SPSS. Workshop offered by the Mississippi Center for Supercomputing Research and the UM Office of Information Technology

Regression in SPSS Workshop offered by the Mississippi Center for Supercomputing Research and the UM Office of Information Technology John P. Bentley Department of Pharmacy Administration University of

### SELF-TEST: SIMPLE REGRESSION

ECO 22000 McRAE SELF-TEST: SIMPLE REGRESSION Note: Those questions indicated with an (N) are unlikely to appear in this form on an in-class examination, but you should be able to describe the procedures

### How Do We Test Multiple Regression Coefficients?

How Do We Test Multiple Regression Coefficients? Suppose you have constructed a multiple linear regression model and you have a specific hypothesis to test which involves more than one regression coefficient.

### Chapter 11: Linear Regression - Inference in Regression Analysis - Part 2

Chapter 11: Linear Regression - Inference in Regression Analysis - Part 2 Note: Whether we calculate confidence intervals or perform hypothesis tests we need the distribution of the statistic we will use.

### Econ 371 Problem Set #3 Answer Sheet

Econ 371 Problem Set #3 Answer Sheet 4.3 In this question, you are told that a OLS regression analysis of average weekly earnings yields the following estimated model. AW E = 696.7 + 9.6 Age, R 2 = 0.023,

### Introduction to Stata

Introduction to Stata September 23, 2014 Stata is one of a few statistical analysis programs that social scientists use. Stata is in the mid-range of how easy it is to use. Other options include SPSS,

### 15.1 The Regression Model: Analysis of Residuals

15.1 The Regression Model: Analysis of Residuals Tom Lewis Fall Term 2009 Tom Lewis () 15.1 The Regression Model: Analysis of Residuals Fall Term 2009 1 / 12 Outline 1 The regression model 2 Estimating

### Simple Linear Regression Chapter 11

Simple Linear Regression Chapter 11 Rationale Frequently decision-making situations require modeling of relationships among business variables. For instance, the amount of sale of a product may be related

### 12-1 Multiple Linear Regression Models

12-1.1 Introduction Many applications of regression analysis involve situations in which there are more than one regressor variable. A regression model that contains more than one regressor variable is

### Paired Differences and Regression

Paired Differences and Regression Students sometimes have difficulty distinguishing between paired data and independent samples when comparing two means. One can return to this topic after covering simple

### Multiple Regression in SPSS STAT 314

Multiple Regression in SPSS STAT 314 I. The accompanying data is on y = profit margin of savings and loan companies in a given year, x 1 = net revenues in that year, and x 2 = number of savings and loan

### 1. ε is normally distributed with a mean of 0 2. the variance, σ 2, is constant 3. All pairs of error terms are uncorrelated

STAT E-150 Statistical Methods Residual Analysis; Data Transformations The validity of the inference methods (hypothesis testing, confidence intervals, and prediction intervals) depends on the error term,

### 12.1 Inference for Linear Regression

12.1 Inference for Linear Regression Least Squares Regression Line y = a + bx You might want to refresh your memory of LSR lines by reviewing Chapter 3! 1 Sample Distribution of b p740 Shape Center Spread

### NCSS Statistical Software Principal Components Regression. In ordinary least squares, the regression coefficients are estimated using the formula ( )

Chapter 340 Principal Components Regression Introduction is a technique for analyzing multiple regression data that suffer from multicollinearity. When multicollinearity occurs, least squares estimates

### Correlation Regression

Correlation Regression Διατμηματικό ΠΜΣ Επαγγελματική και Περιβαλλοντική Υγεία-Διαχείριση και Οικονομική Αποτίμηση Δημήτρης Φουσκάκης Correlation To assess whether two variables are linearly associated,,

### Exam and Solution. Please discuss each problem on a separate sheet of paper, not just on a separate page!

Econometrics - Exam 1 Exam and Solution Please discuss each problem on a separate sheet of paper, not just on a separate page! Problem 1: (20 points A health economist plans to evaluate whether screening

### Univariate Regression

Univariate Regression Correlation and Regression The regression line summarizes the linear relationship between 2 variables Correlation coefficient, r, measures strength of relationship: the closer r is

### E205 Final: Version B

Name: Class: Date: E205 Final: Version B Multiple Choice Identify the choice that best completes the statement or answers the question. 1. The owner of a local nightclub has recently surveyed a random

### Regression in Stata. Alicia Doyle Lynch Harvard-MIT Data Center (HMDC)

Regression in Stata Alicia Doyle Lynch Harvard-MIT Data Center (HMDC) Documents for Today Find class materials at: http://libraries.mit.edu/guides/subjects/data/ training/workshops.html Several formats

### Practice 3 SPSS. Partially based on Notes from the University of Reading:

Practice 3 SPSS Partially based on Notes from the University of Reading: http://www.reading.ac.uk Simple Linear Regression A simple linear regression model is fitted when you want to investigate whether

### Multiple Linear Regression

Multiple Linear Regression A regression with two or more explanatory variables is called a multiple regression. Rather than modeling the mean response as a straight line, as in simple regression, it is

### Regression Analysis. Data Calculations Output

Regression Analysis In an attempt to find answers to questions such as those posed above, empirical labour economists use a useful tool called regression analysis. Regression analysis is essentially a

### Regression in ANOVA. James H. Steiger. Department of Psychology and Human Development Vanderbilt University

Regression in ANOVA James H. Steiger Department of Psychology and Human Development Vanderbilt University James H. Steiger (Vanderbilt University) 1 / 30 Regression in ANOVA 1 Introduction 2 Basic Linear

### August 2012 EXAMINATIONS Solution Part I

August 01 EXAMINATIONS Solution Part I (1) In a random sample of 600 eligible voters, the probability that less than 38% will be in favour of this policy is closest to (B) () In a large random sample,

### Introduction. Hypothesis Testing. Hypothesis Testing. Significance Testing

Introduction Hypothesis Testing Mark Lunt Arthritis Research UK Centre for Ecellence in Epidemiology University of Manchester 13/10/2015 We saw last week that we can never know the population parameters

### 2. Simple Linear Regression

Research methods - II 3 2. Simple Linear Regression Simple linear regression is a technique in parametric statistics that is commonly used for analyzing mean response of a variable Y which changes according

### Lesson Lesson Outline Outline

Lesson 15 Linear Regression Lesson 15 Outline Review correlation analysis Dependent and Independent variables Least Squares Regression line Calculating l the slope Calculating the Intercept Residuals and

### Outline. Topic 4 - Analysis of Variance Approach to Regression. Partitioning Sums of Squares. Total Sum of Squares. Partitioning sums of squares

Topic 4 - Analysis of Variance Approach to Regression Outline Partitioning sums of squares Degrees of freedom Expected mean squares General linear test - Fall 2013 R 2 and the coefficient of correlation

### 12/31/2016. PSY 512: Advanced Statistics for Psychological and Behavioral Research 2

PSY 512: Advanced Statistics for Psychological and Behavioral Research 2 Understand linear regression with a single predictor Understand how we assess the fit of a regression model Total Sum of Squares

### Econ 371 Problem Set #3 Answer Sheet

Econ 371 Problem Set #3 Answer Sheet 4.1 In this question, you are told that a OLS regression analysis of third grade test scores as a function of class size yields the following estimated model. T estscore

### CHAPTER 2 AND 10: Least Squares Regression

CHAPTER 2 AND 0: Least Squares Regression In chapter 2 and 0 we will be looking at the relationship between two quantitative variables measured on the same individual. General Procedure:. Make a scatterplot

### The general form of the PROC GLM statement is

Linear Regression Analysis using PROC GLM Regression analysis is a statistical method of obtaining an equation that represents a linear relationship between two variables (simple linear regression), or

### Regression, least squares

Regression, least squares Joe Felsenstein Department of Genome Sciences and Department of Biology Regression, least squares p.1/24 Fitting a straight line X Two distinct cases: The X values are chosen

### Lecture 7 Linear Regression Diagnostics

Lecture 7 Linear Regression Diagnostics BIOST 515 January 27, 2004 BIOST 515, Lecture 6 Major assumptions 1. The relationship between the outcomes and the predictors is (approximately) linear. 2. The error

### Heteroskedasticity Richard Williams, University of Notre Dame, Last revised January 30, 2015

Heteroskedasticity Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised January 30, 2015 These notes draw heavily from Berry and Feldman, and, to a lesser extent, Allison,

### Lectures 8, 9 & 10. Multiple Regression Analysis

Lectures 8, 9 & 0. Multiple Regression Analysis In which you learn how to apply the principles and tests outlined in earlier lectures to more realistic models involving more than explanatory variable and

### Regression Analysis: Basic Concepts

The simple linear model Regression Analysis: Basic Concepts Allin Cottrell Represents the dependent variable, y i, as a linear function of one independent variable, x i, subject to a random disturbance

### Interaction effects between continuous variables (Optional)

Interaction effects between continuous variables (Optional) Richard Williams, University of Notre Dame, http://www.nd.edu/~rwilliam/ Last revised February 0, 05 This is a very brief overview of this somewhat

### Group Comparisons: Differences in Composition Versus Differences in Models and Effects

Group Comparisons: Differences in Composition Versus Differences in Models and Effects Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised February 15, 2015 Overview.

### e = random error, assumed to be normally distributed with mean 0 and standard deviation σ

1 Linear Regression 1.1 Simple Linear Regression Model The linear regression model is applied if we want to model a numeric response variable and its dependency on at least one numeric factor variable.

### ECON Introductory Econometrics. Lecture 17: Experiments

ECON4150 - Introductory Econometrics Lecture 17: Experiments Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 13 Lecture outline 2 Why study experiments? The potential outcome framework.

### 31. SIMPLE LINEAR REGRESSION VI: LEVERAGE AND INFLUENCE

31. SIMPLE LINEAR REGRESSION VI: LEVERAGE AND INFLUENCE These topics are not covered in the text, but they are important. Leverage If the data set contains outliers, these can affect the leastsquares fit.

### Lecture 5 Hypothesis Testing in Multiple Linear Regression

Lecture 5 Hypothesis Testing in Multiple Linear Regression BIOST 515 January 20, 2004 Types of tests 1 Overall test Test for addition of a single variable Test for addition of a group of variables Overall

### Multiple Regression Analysis in Minitab 1

Multiple Regression Analysis in Minitab 1 Suppose we are interested in how the exercise and body mass index affect the blood pressure. A random sample of 10 males 50 years of age is selected and their

### Data Mining and Data Warehousing. Henryk Maciejewski. Data Mining Predictive modelling: regression

Data Mining and Data Warehousing Henryk Maciejewski Data Mining Predictive modelling: regression Algorithms for Predictive Modelling Contents Regression Classification Auxiliary topics: Estimation of prediction

### An example ANOVA situation. 1-Way ANOVA. Some notation for ANOVA. Are these differences significant? Example (Treating Blisters)

An example ANOVA situation Example (Treating Blisters) 1-Way ANOVA MATH 143 Department of Mathematics and Statistics Calvin College Subjects: 25 patients with blisters Treatments: Treatment A, Treatment

### Lecture 16. Autocorrelation

Lecture 16. Autocorrelation In which you learn to recognise whether the residuals from your model are correlated over time, the consequences of this for OLS estimation, how to test for autocorrelation

### ECON 142 SKETCH OF SOLUTIONS FOR APPLIED EXERCISE #2

University of California, Berkeley Prof. Ken Chay Department of Economics Fall Semester, 005 ECON 14 SKETCH OF SOLUTIONS FOR APPLIED EXERCISE # Question 1: a. Below are the scatter plots of hourly wages

### Interpreting Multiple Regression

Fall Semester, 2001 Statistics 621 Lecture 5 Robert Stine 1 Preliminaries Interpreting Multiple Regression Project and assignments Hope to have some further information on project soon. Due date for Assignment

### Regression Analysis. Pekka Tolonen

Regression Analysis Pekka Tolonen Outline of Topics Simple linear regression: the form and estimation Hypothesis testing and statistical significance Empirical application: the capital asset pricing model

### 1. The parameters to be estimated in the simple linear regression model Y=α+βx+ε ε~n(0,σ) are: a) α, β, σ b) α, β, ε c) a, b, s d) ε, 0, σ

STA 3024 Practice Problems Exam 2 NOTE: These are just Practice Problems. This is NOT meant to look just like the test, and it is NOT the only thing that you should study. Make sure you know all the material

### Section I: Multiple Choice Select the best answer for each question.

Chapter 15 (Regression Inference) AP Statistics Practice Test (TPS- 4 p796) Section I: Multiple Choice Select the best answer for each question. 1. Which of the following is not one of the conditions that

### Using R for Linear Regression

Using R for Linear Regression In the following handout words and symbols in bold are R functions and words and symbols in italics are entries supplied by the user; underlined words and symbols are optional

### 2013 MBA Jump Start Program. Statistics Module Part 3

2013 MBA Jump Start Program Module 1: Statistics Thomas Gilbert Part 3 Statistics Module Part 3 Hypothesis Testing (Inference) Regressions 2 1 Making an Investment Decision A researcher in your firm just

### Simple Linear Regression in SPSS STAT 314

Simple Linear Regression in SPSS STAT 314 1. Ten Corvettes between 1 and 6 years old were randomly selected from last year s sales records in Virginia Beach, Virginia. The following data were obtained,

### Department of Economics, Session 2012/2013. EC352 Econometric Methods. Exercises from Week 03

Department of Economics, Session 01/013 University of Essex, Autumn Term Dr Gordon Kemp EC35 Econometric Methods Exercises from Week 03 1 Problem P3.11 The following equation describes the median housing

### The importance of graphing the data: Anscombe s regression examples

The importance of graphing the data: Anscombe s regression examples Bruce Weaver Northern Health Research Conference Nipissing University, North Bay May 30-31, 2008 B. Weaver, NHRC 2008 1 The Objective

### Regression Analysis (Spring, 2000)

Regression Analysis (Spring, 2000) By Wonjae Purposes: a. Explaining the relationship between Y and X variables with a model (Explain a variable Y in terms of Xs) b. Estimating and testing the intensity

### Statistical Models in R

Statistical Models in R Some Examples Steven Buechler Department of Mathematics 276B Hurley Hall; 1-6233 Fall, 2007 Outline Statistical Models Linear Models in R Regression Regression analysis is the appropriate

### Module 5: Multiple Regression Analysis

Using Statistical Data Using to Make Statistical Decisions: Data Multiple to Make Regression Decisions Analysis Page 1 Module 5: Multiple Regression Analysis Tom Ilvento, University of Delaware, College

### Department of Economics Session 2012/2013. EC352 Econometric Methods. Solutions to Exercises from Week 10 + 0.0077 (0.052)

Department of Economics Session 2012/2013 University of Essex Spring Term Dr Gordon Kemp EC352 Econometric Methods Solutions to Exercises from Week 10 1 Problem 13.7 This exercise refers back to Equation

### Simple linear regression

Simple linear regression Introduction Simple linear regression is a statistical method for obtaining a formula to predict values of one variable from another where there is a causal relationship between

### MODEL I: DRINK REGRESSED ON GPA & MALE, WITHOUT CENTERING

Interpreting Interaction Effects; Interaction Effects and Centering Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised February 20, 2015 Models with interaction effects

### Statistics in Geophysics: Linear Regression II

Statistics in Geophysics: Linear Regression II Steffen Unkel Department of Statistics Ludwig-Maximilians-University Munich, Germany Winter Term 2013/14 1/28 Model definition Suppose we have the following

MODELING AUTO INSURANCE PREMIUMS Brittany Parahus, Siena College INTRODUCTION The findings in this paper will provide the reader with a basic knowledge and understanding of how Auto Insurance Companies

Lecture 11: Outliers and Influential data Regression III: Advanced Methods William G. Jacoby Michigan State University http://polisci.msu.edu/jacoby/icpsr/regress3 Outlying Observations: Why pay attention?

### Lectures 4&5 Program. 1. Residuals and diagnostics. 2. Variable selection

Lectures 4&5 Program 1. Residuals and diagnostics 2. Variable selection 1 Assumptions for linear regression y i = η i + ε i i = 1, 2,..., n 1. Linearity: η i = β 0 + β 1 x i1 + + β p x ip 2. Constant variance

### " Y. Notation and Equations for Regression Lecture 11/4. Notation:

Notation: Notation and Equations for Regression Lecture 11/4 m: The number of predictor variables in a regression Xi: One of multiple predictor variables. The subscript i represents any number from 1 through

### Chapter 5: Linear regression

Chapter 5: Linear regression Last lecture: Ch 4............................................................ 2 Next: Ch 5................................................................. 3 Simple linear

### (d) True or false? When the number of treatments a=9, the number of blocks b=10, and the other parameters r =10 and k=9, it is a BIBD design.

PhD Qualifying exam Methodology Jan 2014 Solutions 1. True or false question - only circle "true " or "false" (a) True or false? F-statistic can be used for checking the equality of two population variances

### DEPARTMENT OF PSYCHOLOGY UNIVERSITY OF LANCASTER MSC IN PSYCHOLOGICAL RESEARCH METHODS ANALYSING AND INTERPRETING DATA 2 PART 1 WEEK 9

DEPARTMENT OF PSYCHOLOGY UNIVERSITY OF LANCASTER MSC IN PSYCHOLOGICAL RESEARCH METHODS ANALYSING AND INTERPRETING DATA 2 PART 1 WEEK 9 Analysis of covariance and multiple regression So far in this course,

### AP * Statistics Review. Linear Regression

AP * Statistics Review Linear Regression Teacher Packet Advanced Placement and AP are registered trademark of the College Entrance Examination Board. The College Board was not involved in the production

### Regression. Name: Class: Date: Multiple Choice Identify the choice that best completes the statement or answers the question.

Class: Date: Regression Multiple Choice Identify the choice that best completes the statement or answers the question. 1. Given the least squares regression line y8 = 5 2x: a. the relationship between

### Multiple Regression YX1 YX2 X1X2 YX1.X2

Multiple Regression Simple or total correlation: relationship between one dependent and one independent variable, Y versus X Coefficient of simple determination: r (or r, r ) YX YX XX Partial correlation: