Welcome to the class! set.seed(843) df <- tibble::data_frame(

Slides:



Advertisements
Similar presentations
Irwin/McGraw-Hill © Andrew F. Siegel, 1997 and l Chapter 12 l Multiple Regression: Predicting One Factor from Several Others.
Advertisements

Inference for Regression
Linear regression models
Ch11 Curve Fitting Dr. Deshi Ye
Simple Linear Regression
Chapter 13 Multiple Regression
LINEAR REGRESSION: Evaluating Regression Models Overview Assumptions for Linear Regression Evaluating a Regression Model.
LINEAR REGRESSION: Evaluating Regression Models. Overview Assumptions for Linear Regression Evaluating a Regression Model.
Chapter 10 Simple Regression.
© 2000 Prentice-Hall, Inc. Chap Multiple Regression Models.
Multiple Regression Models. The Multiple Regression Model The relationship between one dependent & two or more independent variables is a linear function.
Lecture 19: Tues., Nov. 11th R-squared (8.6.1) Review
Lesson #32 Simple Linear Regression. Regression is used to model and/or predict a variable; called the dependent variable, Y; based on one or more independent.
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 14-1 Chapter 14 Introduction to Multiple Regression Basic Business Statistics 11 th Edition.
Simple Linear Regression Analysis
Ch. 14: The Multiple Regression Model building
Simple Linear Regression Analysis
Relationships Among Variables
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 13-1 Chapter 13 Introduction to Multiple Regression Statistics for Managers.
Regression and Correlation Methods Judy Zhong Ph.D.
Introduction to Linear Regression and Correlation Analysis
Simple Linear Regression
© 2002 Prentice-Hall, Inc.Chap 14-1 Introduction to Multiple Regression Model.
7.1 - Motivation Motivation Correlation / Simple Linear Regression Correlation / Simple Linear Regression Extensions of Simple.
Applied Quantitative Analysis and Practices LECTURE#23 By Dr. Osman Sadiq Paracha.
Multiple Regression and Model Building Chapter 15 Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
Lesson Multiple Regression Models. Objectives Obtain the correlation matrix Use technology to find a multiple regression equation Interpret the.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 13 Multiple Regression Section 13.3 Using Multiple Regression to Make Inferences.
© Copyright McGraw-Hill Correlation and Regression CHAPTER 10.
Simple Linear Regression (SLR)
Simple Linear Regression (OLS). Types of Correlation Positive correlationNegative correlationNo correlation.
Lecture 10: Correlation and Regression Model.
Environmental Modeling Basic Testing Methods - Statistics III.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.. Chap 14-1 Chapter 14 Introduction to Multiple Regression Basic Business Statistics 10 th Edition.
Lesson 14 - R Chapter 14 Review. Objectives Summarize the chapter Define the vocabulary used Complete all objectives Successfully answer any of the review.
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.
1 1 Slide The Simple Linear Regression Model n Simple Linear Regression Model y =  0 +  1 x +  n Simple Linear Regression Equation E( y ) =  0 + 
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc.Chap 14-1 Statistics for Managers Using Microsoft® Excel 5th Edition Chapter.
Analysis of Covariance KNNL – Chapter 22. Analysis of Covariance Goal: To Compare treatments (1-Factor or Multiple Factors) after Controlling for Numeric.
Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Multiple Regression Chapter 14.
The “Big Picture” (from Heath 1995). Simple Linear Regression.
Chapter 14 Introduction to Multiple Regression
Chapter 20 Linear and Multiple Regression
Regression Analysis AGEC 784.
Chapter 12 Simple Linear Regression and Correlation
CHAPTER 7 Linear Correlation & Regression Methods
Chapter 13 Created by Bethany Stubbe and Stephan Kogitz.
Analysis of Covariance (ANCOVA)
Applied Statistical Analysis
12 Inferential Analysis.
Chapter 13 Simple Linear Regression
Checking Regression Model Assumptions
9/19/2018 ST3131, Lecture 6.
Correlation and Regression
CHAPTER 29: Multiple Regression*
Chapter 12 Inference on the Least-squares Regression Line; ANOVA
Checking Regression Model Assumptions
Chapter 12 Simple Linear Regression and Correlation
Multiple Regression Models
Review of Chapter 2 Some Basic Concepts: Sample center
LEARNING OUTCOMES After studying this chapter, you should be able to
Simple Linear Regression
12 Inferential Analysis.
Simple Linear Regression
Simple Linear Regression
Welcome to the class!.
Analysis of Covariance
Nazmus Saquib, PhD Head of Research Sulaiman AlRajhi Colleges
Presentation transcript:

Welcome to the class! set.seed(843) df <- tibble::data_frame( x = rnorm(100), y = x + rnorm(100), group = ifelse(x > 0, 1, 0), xs = scale(x) %>% as.numeric, ys = scale(y) %>% as.numeric ) df library(tidyverse) df %>% t.test(y ~ group, data = ., var.equal = TRUE) lm(y ~ group, data = .) %>% summary() aov(y ~ group, cor.test(~ ys + xs, data = .) lm(ys ~ xs,

Statistical Control & Linear Models EDUC 7610 Statistical Control & Linear Models Chapter 1 Fall 2018 Tyson S. Barrett, PhD 𝒀 𝒊 = 𝜷 𝟎 + 𝜷 𝟏 𝑿 𝟏𝒊 + 𝝐 𝒊

Linear Models We will discuss how to use linear models to understand relationships in data and how this may generalize to the population Everything you learned in EDUC 6600 applies here, but we will extend it (and probably simplify it somewhat) https://calpolystat2.shinyapps.io/3d_regression/

Linear Models Most everything you’ve learned are specific approaches of linear models T-tests Two Sample t-test data: y by group t = -6.6051, df = 98, p-value = 2.068e-09 95 percent confidence interval: -2.000130 -1.075936 sample estimates: mean in group 0 mean in group 1 -0.7976132 0.7404197 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.7976 0.1562 -5.106 1.62e-06 *** group 1.5380 0.2329 6.605 2.07e-09 *** --- Residual standard error: 1.158 on 98 degrees of freedom Multiple R-squared: 0.308, Adjusted R-squared: 0.301 F-statistic: 43.63 on 1 and 98 DF, p-value: 2.068e-09

Linear Models Most everything you’ve learned are specific approaches of linear models T-tests ANOVA Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.7976 0.1562 -5.106 1.62e-06 *** group 1.5380 0.2329 6.605 2.07e-09 *** --- Residual standard error: 1.158 on 98 degrees of freedom Multiple R-squared: 0.308, Adjusted R-squared: 0.301 F-statistic: 43.63 on 1 and 98 DF, p-value: 2.068e-09 Df Sum Sq Mean Sq F value Pr(>F) group 1 58.55 58.55 43.63 2.07e-09 Residuals 98 131.52 1.34

Linear Models Most everything you’ve learned are specific approaches of linear models T-tests ANOVA Correlation Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -6.548e-17 7.108e-02 0.000 1 xs 7.070e-01 7.144e-02 9.897 <2e-16 *** --- Residual standard error: 0.7108 on 98 degrees of freedom Multiple R-squared: 0.4999 F-statistic: 97.95 on 1 and 98 DF, p-value: < 2.2e-16 t = 9.8972, df = 98, p-value < 2.2e-16 95 percent confidence interval: 0.5929508 0.7932781 sample estimates: cor 0.7070244

So what are linear models? “Model” is a simplification of how something works “Linear” says the relationships are linear Here, we use regression analysis (Ordinary Least Squares) to build linear models

So what are linear models? Outcome Variable Covariates 𝒀 𝒊 = 𝜷 𝟎 + 𝜷 𝟏 𝑿 𝟏𝒊 + … + 𝝐 𝒊 Error (random) term Intercept (constant) Regression Slope (coefficient, weight)

Requirements for linear models Participants (rows in a rectangular data matrix) Measures (in rectangular data matrix form) Each variable a single column of numbers A single dependent variable Dependent variable is numeric (otherwise, GLMs) Other assumptions for statistical inference Tidy Data Page 9

Tidy Data The idea of having rows be observations and columns are variables The ideal for data prep for all analyses (especially in R) Pre-print: http://vita.had.co.nz/papers/tidy-data.pdf

Tidy Data Some pragmatic guidelines to have tidy data 1 Be Consistent 2 Choose good names for things 3 Write dates as YYYY-MM-DD 4 Put just one thing in a cell 5 Make it a rectangle 6 Create a data dictionary

Linear models are flexible Predictor can be experimentally manipulated or naturally occurring A dependent variable in one model can be a predictor in another Predictors may be dichotomous, multi-categorical or continuous Predictors can be correlated Predictors may interact Can be extended to handle curvilinear relations Assumptions are not all that limiting Page 10

Some Vocabulary Predictor = the variable that predicts the outcome Independent Variable (IV) = the predictor(s) of interest Covariates = the predictors that are not considered IV Control = a class of methods that remove (or control for) the effect of another variable Page 10

Controlling for Confounders Five Types of Control Random assignment on the independent variable Manipulation of covariates Other types of randomization Exclusion of cases Statistical control Experimental Control https://calpolystat2.shinyapps.io/3d_regression/

Statistical Control i.e., “Adjust for”, “Correct for”, “Hold constant”, “Partial out” Linear models allow us to control for the effects of covariates We’ll discuss more about how this works, but essentially makes everyone statistically equal on each covariate Can assess how much of the differences in the outcome are uniquely attributable to the IV (once we take out the effect of the covariates) https://calpolystat2.shinyapps.io/3d_regression/

https://calpolystat2.shinyapps.io/3d_regression/