Creating Graphs on Saturn GOPTIONS DEVICE = png HTITLE=2 HTEXT=1.5 GSFMODE = replace; PROC REG DATA=agebp; MODEL sbp = age; PLOT sbp*age; RUN; This will.

Slides:



Advertisements
Similar presentations
Chapter 12 Simple Linear Regression
Advertisements

EPI 809/Spring Probability Distribution of Random Error.
Chapter 12 Simple Linear Regression
1 1 Slide © 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
Some Terms Y =  o +  1 X Regression of Y on X Regress Y on X X called independent variable or predictor variable or covariate or factor Which factors.
Multiple regression analysis
Reading – Linear Regression Le (Chapter 8 through 8.1.6) C &S (Chapter 5:F,G,H)
The Simple Regression Model
Chapter 11 Multiple Regression.
1 1 Slide © 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
1 1 Slide © 2003 South-Western/Thomson Learning™ Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
This Week Continue with linear regression Begin multiple regression –Le 8.2 –C & S 9:A-E Handout: Class examples and assignment 3.
Chapter 14 Introduction to Linear Regression and Correlation Analysis
Correlation and Regression Analysis
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS & Updated by SPIROS VELIANITIS.
Introduction to Linear Regression and Correlation Analysis
MAT 254 – Probability and Statistics Sections 1,2 & Spring.
1 1 Slide © 2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
© 2002 Prentice-Hall, Inc.Chap 14-1 Introduction to Multiple Regression Model.
EQT 272 PROBABILITY AND STATISTICS
Ms. Khatijahhusna Abd Rani School of Electrical System Engineering Sem II 2014/2015.
1 1 Slide © 2005 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Econ 3790: Business and Economics Statistics
1 1 Slide © 2005 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 1 Slide © 2003 Thomson/South-Western Chapter 13 Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple Coefficient of Determination.
1 1 Slide © 2007 Thomson South-Western. All Rights Reserved OPIM 303-Lecture #9 Jose M. Cruz Assistant Professor.
1 1 Slide © 2007 Thomson South-Western. All Rights Reserved Chapter 13 Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple.
1 1 Slide Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple Coefficient of Determination n Model Assumptions n Testing.
1 1 Slide © 2004 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 Experimental Statistics - week 10 Chapter 11: Linear Regression and Correlation.
Econ 3790: Business and Economics Statistics Instructor: Yogesh Uppal
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 15 Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple.
1 Experimental Statistics - week 10 Chapter 11: Linear Regression and Correlation Note: Homework Due Thursday.
INTRODUCTORY LINEAR REGRESSION SIMPLE LINEAR REGRESSION - Curve fitting - Inferences about estimated parameter - Adequacy of the models - Linear.
Regression Examples. Gas Mileage 1993 SOURCES: Consumer Reports: The 1993 Cars - Annual Auto Issue (April 1993), Yonkers, NY: Consumers Union. PACE New.
Regression For the purposes of this class: –Does Y depend on X? –Does a change in X cause a change in Y? –Can Y be predicted from X? Y= mX + b Predicted.
1 1 Slide Simple Linear Regression Coefficient of Determination Chapter 14 BA 303 – Spring 2011.
Introduction to Linear Regression
Chap 12-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition Chapter 12 Introduction to Linear.
1 1 Slide © 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
1 Chapter 12 Simple Linear Regression. 2 Chapter Outline  Simple Linear Regression Model  Least Squares Method  Coefficient of Determination  Model.
6-1 Introduction To Empirical Models Based on the scatter diagram, it is probably reasonable to assume that the mean of the random variable Y is.
Topic 13: Multiple Linear Regression Example. Outline Description of example Descriptive summaries Investigation of various models Conclusions.
CORRELATION: Correlation analysis Correlation analysis is used to measure the strength of association (linear relationship) between two quantitative variables.
© Copyright McGraw-Hill Correlation and Regression CHAPTER 10.
Chapter 13 Multiple Regression
Multiple Regression. Simple Regression in detail Y i = β o + β 1 x i + ε i Where Y => Dependent variable X => Independent variable β o => Model parameter.
Chapter 12 Simple Linear Regression n Simple Linear Regression Model n Least Squares Method n Coefficient of Determination n Model Assumptions n Testing.
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 + 
Business Research Methods
Experimental Statistics - week 9
Lecture 10 Introduction to Linear Regression and Correlation Analysis.
1 Experimental Statistics - week 12 Chapter 11: Linear Regression and Correlation Chapter 12: Multiple Regression.
REGRESSION AND CORRELATION SIMPLE LINEAR REGRESSION 10.2 SCATTER DIAGRAM 10.3 GRAPHICAL METHOD FOR DETERMINING REGRESSION 10.4 LEAST SQUARE METHOD.
1 Experimental Statistics - week 11 Chapter 11: Linear Regression and Correlation.
INTRODUCTION TO MULTIPLE REGRESSION MULTIPLE REGRESSION MODEL 11.2 MULTIPLE COEFFICIENT OF DETERMINATION 11.3 MODEL ASSUMPTIONS 11.4 TEST OF SIGNIFICANCE.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University.
Lecture 11: Simple Linear Regression
Chapter 20 Linear and Multiple Regression
Interactions Interaction: Does the relationship between two variables depend on a third variable? Does the relationship of age to BP depend on gender Does.
Correlation and Regression
Essentials of Modern Business Statistics (7e)
John Loucks St. Edward’s University . SLIDES . BY.
Statistics for Business and Economics (13e)
Quantitative Methods Simple Regression.
Slides by JOHN LOUCKS St. Edward’s University.
Multiple Linear Regression
St. Edward’s University
Presentation transcript:

Creating Graphs on Saturn GOPTIONS DEVICE = png HTITLE=2 HTEXT=1.5 GSFMODE = replace; PROC REG DATA=agebp; MODEL sbp = age; PLOT sbp*age; RUN; This will create file sasgraph.png 1. Transfer file to PC (binary mode) 2. Open Word 3. Choose Insert picture from file PROC REG DATA=agebp LP; MODEL sbp = age; PLOT sbp*age; RUN;

Multiple Linear Regression More than 1 independent variable –See how combinations of several variables are associated with and can predict the dependent variable. How much of the total variability can be explained? –Control for confounding (interested in the effect of one variable but want to “adjust” for another variable) –Explore interactions PROC REG DATA=datasetname ; MODEL depvar = x1; MODEL depvar = x1 x2; MODEL depvar = x1 x2 x3; RUN;

Question Explored Using Multiple Regression How much of the variation in test scores among school districts can be explained by several district characteristics? Is calcium intake related to BP independent of age? Is the relationship between age and BP the same for men and women.

Reminder Y variable is continuous and is normally distributed for each combination of X’s with the same variability X variables can be continuous or indicator variables and do not need to be normally distributed

2 Factors 1.Y =  0 +  1 X 1 2.Y =  0 +  2 X 2 3.Y =  0 +  1 X 1 +  2 X 2 Do you get the same slope in models 1 and 3

Control for confounding Both SLR models for each cohort significant Overall not significant (negative confounding)

n The equation that describes how the mean value of y is related to x 1, x 2,... x p.  y =  0 +  1 x 1 +  2 x  p x p Multiple Regression Equation    =  Mean of y when all x variables are equal to 0  i = change in mean y corresponding to a 1 unit change in x i considering all other predictors fixed Implied: The impact of x 1 is the same for each of the other values of x 2, x 3, … x p

Multiple Regression Model n The equation that describes how the dependent variable y is related to the independent variables x 1, x 2,... x p and an error term is called the multiple regression model. y =  0 +  1 x 1 +  2 x  p x p +  reflects how individuals deviate from others with the same values of x’s  reflects how individuals deviate from others with the same values of x’s

n The estimated multiple regression equation is: y = b 0 + b 1 x 1 + b 2 x b p x p Estimated Multiple Regression Equation ^ b i estimates  i y y is estimated (or predicted) value for a set of x’s ^

Estimation n Least Squares Criterion n Computation of Coefficients Values The formulas for the regression coefficients b 0, b 1, b 2,... b p involve the use of matrix algebra. We will use SAS to perform the calculations. ^

Find the best multidimensional plane

Testing for Significance: Global Test n Hypotheses H 0 :  1 =  2 =... =  p = 0 H 0 :  1 =  2 =... =  p = 0 H a : One or more of the parameters H a : One or more of the parameters is not equal to zero. is not equal to zero. n Test Statistic F = MSR/MSE n Rejection Rule Reject H 0 if F > F  where F  is based on an F distribution with p d.f. in the numerator and n - p - 1 d.f. in the denominator.

Testing for Significance: Individual  ’s n Hypotheses H 0 :  i = 0 H 0 :  i = 0 H a :  i = 0 H a :  i = 0 n Test Statistic n Rejection Rule Reject H 0 for small or large t Meaning: Is X i related to Y after taking into account all other variables in the model

Possibilities n X1 is related to Y alone but after adjusting for X2, then X1 is no longer related to Y n X1 is not related to Y alone but after adjusting for X2, then X1 is related to Y n Relation of X1 with Y1 gets stronger after adjusting for X2 n Relation of X1 with Y gets weaker after adjusting for X2

Pulmonary Function Example Dependent Variable: Forced Expired Volume (FEV 1.0 ) Independent Variables: –Age of person –Smoking status of person Questions: –Is age related to FEV independent of smoking status –Is smoking status related to FEV independent of age –How much of the variability in FEV is explained by age and smoking combined

Model for FEV Example Y =  0 +  1 X 1 +  2 X 2 X 1 = smoking status (1=smoker, 0=nonsmoker) X 2 = age Smokers FEV =  0 +  1 +  2 age Non Smokers FEV =  0 +  2 age

Interpretation of Parameters Smokers FEV =  0 +  1 +  2 age Non Smokers FEV =  0 +  2 age  1 is the effect of smoking for fixed levels of age  2 is the effect of age pooled over smokers and non-smokers This model assumes the relation of age to FEV is the same for smokers and non-smokers

DATA fev; INFILE DATALINES; INPUT age smk fev; DATALINES; More data

PROC MEANS; VAR fev; CLASS smk; RUN; The MEANS Procedure Analysis Variable : fev N smk Obs N Mean Std Dev Minimum Maximum

PROC CORR DATA=fev; Pearson Correlation Coefficients, N = 30 Prob > |r| under H0: Rho=0 age smk fev age <.0001 smk fev <

PROC REG; MODEL fev = age smk ; RUN; Dependent Variable: fev Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 2 SSR <.0001 Error 27 SSE Corrected Total 29 SST Root MSE R-Square Dependent Mean Coeff Var Tests Ho:  1 = 0;  2 =0 Proportion of variance explained by both variables

PROC REG; MODEL fev = age smk ; MODEL fev = age ; MODEL fev = smk ; RUN; Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept <.0001 age <.0001 smk Intercept <.0001 age <.0001 Intercept <.0001 smk R 2 =.7038 R 2 =.5333 R 2 =.1000

PROC REG; MODEL fev = age smk; PROC REG; MODEL fev = age ; WHERE smk = 0; PROC REG; MODEL fev = age ; WHERE smk = 1; Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept <.0001 age <.0001 smk Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept <.0001 age Intercept <.0001 age <.0001 Non-smokers Smokers