Normal Linear Model STA211/442 Fall 2014. Suggested Reading Faraway’s Linear Models with R, just start reading. Davison’s Statistical Models, Chapter.

Slides:



Advertisements
Similar presentations
STA305 Spring 2014 This started with excerpts from STA2101f13
Advertisements

Factorial ANOVA More than one categorical explanatory variable.
Introduction to Regression with Measurement Error STA431: Spring 2015.
Irwin/McGraw-Hill © Andrew F. Siegel, 1997 and l Chapter 12 l Multiple Regression: Predicting One Factor from Several Others.
Inference for Regression
Correlation and regression
Regression Part II One-factor ANOVA Another dummy variable coding scheme Contrasts Multiple comparisons Interactions.
Structural Equation Models: The General Case STA431: Spring 2013.
Logistic Regression STA302 F 2014 See last slide for copyright information 1.
The Multiple Regression Model Prepared by Vera Tabakova, East Carolina University.
Lecture 23: Tues., Dec. 2 Today: Thursday:
Statistics for Business and Economics
The Simple Regression Model
Lecture 24: Thurs. Dec. 4 Extra sum of squares F-tests (10.3) R-squared statistic (10.4.1) Residual plots (11.2) Influential observations (11.3,
Stat 217 – Day 25 Regression. Last Time - ANOVA When?  Comparing 2 or means (one categorical and one quantitative variable) Research question  Null.
Introduction to Probability and Statistics Linear Regression and Correlation.
Chapter 9: Correlation and Regression
Introduction to Regression with Measurement Error STA431: Spring 2013.
Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. More About Regression Chapter 14.
Simple Linear Regression Analysis
Review for Final Exam Some important themes from Chapters 9-11 Final exam covers these chapters, but implicitly tests the entire course, because we use.
Normal Linear Model STA211/442 Fall Suggested Reading Davison’s Statistical Models, Chapter 8 The general mixed linear model is defined in Section.
Correlation and Regression
This Week: Testing relationships between two metric variables: Correlation Testing relationships between two nominal variables: Chi-Squared.
Introduction to Linear Regression and Correlation Analysis
Chapter 13: Inference in Regression
Correlation and Linear Regression
© 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on the Least-Squares Regression Model and Multiple Regression 14.
Correlation and Regression
September In Chapter 14: 14.1 Data 14.2 Scatterplots 14.3 Correlation 14.4 Regression.
Introduction to Regression with Measurement Error STA302: Fall/Winter 2013.
BPS - 3rd Ed. Chapter 211 Inference for Regression.
Regression Part II One-factor ANOVA Another dummy variable coding scheme Contrasts Multiple comparisons Interactions.
© 2001 Prentice-Hall, Inc. Statistics for Business and Economics Simple Linear Regression Chapter 10.
Factorial ANOVA More than one categorical explanatory variable STA305 Spring 2014.
Logistic Regression STA2101/442 F 2014 See last slide for copyright information.
Production Planning and Control. A correlation is a relationship between two variables. The data can be represented by the ordered pairs (x, y) where.
1 Chapter 12 Simple Linear Regression. 2 Chapter Outline  Simple Linear Regression Model  Least Squares Method  Coefficient of Determination  Model.
Multiple Regression and Model Building Chapter 15 Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
Inference for Regression Simple Linear Regression IPS Chapter 10.1 © 2009 W.H. Freeman and Company.
MGS3100_04.ppt/Sep 29, 2015/Page 1 Georgia State University - Confidential MGS 3100 Business Analysis Regression Sep 29 and 30, 2015.
Regression Part II One-factor ANOVA Another dummy variable coding scheme Contrasts Multiple comparisons Interactions.
Section 9-1: Inference for Slope and Correlation Section 9-3: Confidence and Prediction Intervals Visit the Maths Study Centre.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 13 Multiple Regression Section 13.3 Using Multiple Regression to Make Inferences.
Copyright ©2011 Brooks/Cole, Cengage Learning Inference about Simple Regression Chapter 14 1.
STA 286 week 131 Inference for the Regression Coefficient Recall, b 0 and b 1 are the estimates of the slope β 1 and intercept β 0 of population regression.
Categorical Independent Variables STA302 Fall 2013.
STA302: Regression Analysis. Statistics Objective: To draw reasonable conclusions from noisy numerical data Entry point: Study relationships between variables.
28. Multiple regression The Practice of Statistics in the Life Sciences Second Edition.
Chapter 14: Inference for Regression. A brief review of chapter 4... (Regression Analysis: Exploring Association BetweenVariables )  Bi-variate data.
Chapter 8: Simple Linear Regression Yang Zhenlin.
Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Simple Linear Regression Analysis Chapter 13.
Introduction to Multiple Regression Lecture 11. The Multiple Regression Model Idea: Examine the linear relationship between 1 dependent (Y) & 2 or more.
Categorical Independent Variables STA302 Fall 2015.
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc.Chap 14-1 Statistics for Managers Using Microsoft® Excel 5th Edition Chapter.
STA302: Regression Analysis. Statistics Objective: To draw reasonable conclusions from noisy numerical data Entry point: Study relationships between variables.
Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Multiple Regression Chapter 14.
Nonparametric Statistics
The Sample Variation Method A way to select sample size This slide show is a free open source document. See the last slide for copyright information.
Logistic Regression For a binary response variable: 1=Yes, 0=No This slide show is a free open source document. See the last slide for copyright information.
BPS - 5th Ed. Chapter 231 Inference for Regression.
GS/PPAL Section N Research Methods and Information Systems
Chapter 14 Introduction to Multiple Regression
Decomposition of Sum of Squares
Interactions and Factorial ANOVA
Simple Linear Regression
Prepared by Lee Revere and John Large
Regression Part II.
Presentation transcript:

Normal Linear Model STA211/442 Fall 2014

Suggested Reading Faraway’s Linear Models with R, just start reading. Davison’s Statistical Models, Chapter 8: The general mixed linear model is defined in Section 9.4, where it is first applied.

General Mixed Linear Model

Fixed Effects Linear Regression

“Regression” Line

Multiple Linear Regression in scalar form

Statistical MODEL There are p-1 explanatory variables For each combination of explanatory variables, the conditional distribution of the response variable Y is normal, with constant variance The conditional population mean of Y depends on the x values, as follows:

Control means hold constant So β 3 is the rate at which E[Y|x] changes as a function of x 3 with all other variables held constant at fixed levels.

Increase x 3 by one unit holding other variables constant So β 3 is the amount that E[Y|x] changes when x 3 is increased by one unit and all other variables are held constant at fixed levels.

It’s model-based control To “hold x 1 constant” at some particular value, like x 1 =14, you don’t even need data at that value. Ordinarily, to estimate E(Y|X 1 =14,X 2 =x), you would need a lot of data at X 1 =14. But look:

Statistics beta-hat estimate parameters beta

Categorical Explanatory Variables X=1 means Drug, X=0 means Placebo Population mean is For patients getting the drug, mean response is For patients getting the placebo, mean response is

Parallel structure for sample regression coefficients X=1 means Drug, X=0 means Placebo Predicted response is For patients getting the drug, predicted response is For patients getting the placebo, predicted response is

Regression test of H 0 : β 1 =0 Same as an independent t-test Same as a oneway ANOVA with 2 categories Same t, same F, same p-value.

Drug A, Drug B, Placebo x 1 = 1 if Drug A, Zero otherwise x 2 = 1 if Drug B, Zero otherwise Fill in the table

Drug A, Drug B, Placebo x 1 = 1 if Drug A, Zero otherwise x 2 = 1 if Drug B, Zero otherwise Regression coefficients are contrasts with the category that has no indicator – the reference category

Indicator dummy variable coding with intercept Need p-1 indicators to represent a categorical explanatory variable with p categories If you use p dummy variables, trouble Regression coefficients are contrasts with the category that has no indicator Call this the reference category

Now add a quantitative variable (covariate) x 1 = Age x 2 = 1 if Drug A, Zero otherwise x 3 = 1 if Drug B, Zero otherwise

Effect coding p-1 dummy variables for p categories Include an intercept Last category gets -1 instead of zero What do the regression coefficients mean?

Meaning of the regression coefficients The grand mean

With effect coding Intercept is the Grand Mean Regression coefficients are deviations of group means from the grand mean. They are the non-redundant effects. Equal population means is equivalent to zero coefficients for all the dummy variables Last category is not a reference category

Add a covariate: Age = x 1 Regression coefficients are deviations from the average conditional population mean (conditional on x 1 ). So if the regression coefficients for all the dummy variables equal zero, the categorical explanatory variable is unrelated to the response variable, controlling for the covariate(s).

Effect coding is very useful when there is more than one categorical explanatory variable and we are interested in interactions --- ways in which the relationship of an explanatory variable with the response variable depends on the value of another explanatory variable. Interaction terms correspond to products of dummy variables.

Analysis of Variance And testing

Analysis of Variance Variation to explain: Total Sum of Squares Variation that is still unexplained: Error Sum of Squares Variation that is explained: Regression (or Model) Sum of Squares

ANOVA Summary Table

Proportion of variation in the response variable that is explained by the explanatory variables

Hypothesis Testing Overall F test for all the explanatory variables at once, t-tests for each regression coefficient: Controlling for all the others, does that explanatory variable matter? Test a collection of explanatory variables controlling for another collection, Most general: Testing whether sets of linear combinations of regression coefficients differ from specified constants.

Controlling for mother’s education and father’s education, are (any of) total family income, assessed value of home and total market value of all vehicles owned by the family related to High School GPA? (A false promise because of measurement error in education)

Full vs. Reduced Model You have 2 sets of variables, A and B Want to test B controlling for A Fit a model with both A and B: Call it the Full Model Fit a model with just A: Call it the Reduced Model It’s a likelihood ratio test (exact)

When you add r more explanatory variables, R 2 can only go up By how much? Basis of F test. Denominator MSE = SSE/df for full model. Anything that reduces MSE of full model increases F Same as testing H 0 : All betas in set B (there are r of them) equal zero

General H 0 : Lβ = h (L is rxp, row rank r)

Compare

Distribution theory for tests, confidence intervals and prediction intervals

Independent chi-squares

Prediction interval

Back to full versus reduced model

F test is based not just on change in R 2, but upon Increase in explained variation expressed as a fraction of the variation that the reduced model does not explain.

For any given sample size, the bigger a is, the bigger F becomes. For any a ≠0, F increases as a function of n. So you can get a large F from strong results and a small sample, or from weak results and a large sample.

Can express a in terms of F Often, scientific journals just report F, numerator df = r, denominator df = (n-p), and a p-value. You can tell if it’s significant, but how strong are the results? Now you can calculate it. This formula is less prone to rounding error than the one in terms of R-squared values

When you add explanatory variables to a model (with observational data) Statistical significance can appear when it was not present originally Statistical significance that was originally present can disappear Even the signs of the beta-hat coefficients can change, reversing the interpretation of how their variables are related to the response variable. Technically, omitted variables cause regression coefficients to be inconsistent.

Are the x values really constants? Experimental versus observational data Omitted variables Measurement error in the explanatory variables A few More Points

Recall Double Expectation E{Y} is a constant. E{Y|X} is a random variable, a function of X.

Beta-hat is (conditionally) unbiased Unbiased unconditionally, too

Perhaps Clearer

Conditional size α test, Critical region A

Why predict a response variable from an explanatory variable? There may be a practical reason for prediction (buy, make a claim, price of wheat). It may be “science.”

Young smokers who buy contraband cigarettes tend to smoke more. What is explanatory variable, response variable?

Correlation versus causation Model is It looks like Y is being produced by a mathematical function of the explanatory variables plus a piece of random noise. And that’s the way people often interpret their results. People who exercise more tend to have better health. Middle aged men who wear hats are more likely to be bald.

Correlation is not the same as causation

Confounding variable: A variable that is associated with both the explanatory variable and the response variable, causing a misleading relationship between them.

Mozart Effect Babies who listen to classical music tend to do better in school later on. Does this mean parents should play classical music for their babies? Please comment. (What is one possible confounding variable?)

Parents’ education The question is DOES THIS MEAN. Answer the question. Expressing an opinion, yes or no gets a zero unless at least one potential confounding variable is mentioned. It may be that it’s helpful to play classical music for babies. The point is that this study does not provide good evidence.

Hypothetical study Subjects are babies in an orphanage awaiting adoption in Canada. All are assigned to adoptive parents, but are waiting for the paperwork to clear. They all wear headphones 5 hours a day. Randomly assigned to classical, rock, hip-hop or nature sounds. Same volume. Carefully keep experimental condition secret from everyone Assess academic progress in JK, SJ, Grade 4. Suppose the classical music babies do better in school later on. What are some potential confounding variables?

Experimental vs. Observational studies Observational: Explanatory, response variable just observed and recorded Experimental: Cases randomly assigned to values of the explanatory variable Only a true experimental study can establish a causal connection between explanatory variable and response variable. Maybe we should talk about observational vs experimental variables. Watch it: Confounding variables can creep back in.

If you ignore measurement error in the explanatory variables Disaster if the (true) variable for which you are trying to control is correlated with the variable you’re trying to test. – Inconsistent estimation – Inflation of Type I error probability Worse when there’s a lot of error in the variable(s) for which you are trying to control. Type I error rate can approach one as n increases.

Example Even controlling for parents’ education and income, children from a particular racial group tend to do worse than average in school. Oh really? How did you control for education and income? I did a regression. How did you deal with measurement error? Huh?

Sometimes it’s not a problem Not as serious for experimental studies, because random assignment erases correlation between explanatory variables. For pure prediction (not for understanding) standard tools are fine with observational data.

More about measurement error R. J. Carroll et al. (2006) Measurement Error in Nonlinear Models W. Fuller (1987) Measurement error models. P. Gustafson (2004) Measurement error and misclassification in statistics and epidemiology

Copyright Information This slide show was prepared by Jerry Brunner, Department of Statistics, University of Toronto. It is licensed under a Creative Commons Attribution - ShareAlike 3.0 Unported License. Use any part of it as you like and share the result freely. These Powerpoint slides will be available from the course website: