Download presentation

Presentation is loading. Please wait.

Published bySky Beemer Modified about 1 year ago

1
EPI 809/Spring Chapter 11 Regression and Correlation methods

2
EPI 809/Spring Learning Objectives 1. Describe the Linear Regression Model 2. State the Regression Modeling Steps 3. Explain Ordinary Least Squares 4. Compute Regression Coefficients 5. Understand and check model assumptions 6. Predict Response Variable 7. Comments of SAS Output

3
EPI 809/Spring Learning Objectives… 8. Correlation Models 9. Link between a correlation model and a regression model 10. Test of coefficient of Correlation

4
EPI 809/Spring Models

5
5 What is a Model? 1. Representation of Some Phenomenon Non-Math/Stats Model 1. Representation of Some Phenomenon Non-Math/Stats Model

6
EPI 809/Spring What is a Math/Stats Model? 1. Often Describe Relationship between Variables 2. Types -Deterministic Models (no randomness) -Probabilistic Models (with randomness)

7
EPI 809/Spring Deterministic Models 1. Hypothesize Exact Relationships 2. Suitable When Prediction Error is Negligible 3. Example: Body mass index (BMI) is measure of body fat based BMI = Weight in Kilograms (Height in Meters) 2 Metric Formula: BMI = Weight in Kilograms (Height in Meters) 2 BMI = Weight (pounds)x703 Non-metric Formula: BMI = Weight (pounds)x703 (Height in inches) 2 (Height in inches) 2

8
EPI 809/Spring Probabilistic Models 1. Hypothesize 2 Components DeterministicDeterministic Random ErrorRandom Error 2. Example: Systolic blood pressure of newborns Is 6 Times the Age in days + Random Error SBP = 6xage(d) + SBP = 6xage(d) + Random Error May Be Due to Factors Other Than age in days (e.g. Birthweight)Random Error May Be Due to Factors Other Than age in days (e.g. Birthweight)

9
EPI 809/Spring Types of Probabilistic Models

10
EPI 809/Spring Regression Models

11
EPI 809/Spring Types of Probabilistic Models

12
EPI 809/Spring Regression Models Relationship between one dependent variable and explanatory variable(s) Use equation to set up relationship Numerical Dependent (Response) VariableNumerical Dependent (Response) Variable 1 or More Numerical or Categorical Independent (Explanatory) Variables1 or More Numerical or Categorical Independent (Explanatory) Variables Used Mainly for Prediction & Estimation

13
EPI 809/Spring Regression Modeling Steps 1.Hypothesize Deterministic Component Estimate Unknown ParametersEstimate Unknown Parameters 2.Specify Probability Distribution of Random Error Term Estimate Standard Deviation of ErrorEstimate Standard Deviation of Error 3.Evaluate the fitted Model 4.Use Model for Prediction & Estimation

14
EPI 809/Spring Model Specification

15
EPI 809/Spring Specifying the deterministic component 1.Define the dependent variable and independent variable 2.Hypothesize Nature of Relationship Expected Effects (i.e., Coefficients’ Signs) Expected Effects (i.e., Coefficients’ Signs) Functional Form (Linear or Non-Linear) Functional Form (Linear or Non-Linear) Interactions Interactions

16
EPI 809/Spring Model Specification Is Based on Theory 1.Theory of Field (e.g., Epidemiology) 2.Mathematical Theory 3.Previous Research 4.‘Common Sense’

17
EPI 809/Spring Thinking Challenge: Which Is More Logical? Years since seroconversion CD+ counts Years since seroconversion CD+ counts

18
EPI 809/Spring OB/GYN Study

19
EPI 809/Spring Types of Regression Models

20
EPI 809/Spring Types of Regression Models Regression Models

21
EPI 809/Spring Types of Regression Models Regression Models Simple 1 Explanatory Variable

22
EPI 809/Spring Types of Regression Models Regression Models 2+ Explanatory Variables Simple Multiple 1 Explanatory Variable

23
EPI 809/Spring Types of Regression Models Regression Models Linear 2+ Explanatory Variables Simple Multiple 1 Explanatory Variable

24
EPI 809/Spring Types of Regression Models Regression Models Linear Non- Linear 2+ Explanatory Variables Simple Multiple 1 Explanatory Variable

25
EPI 809/Spring Types of Regression Models Regression Models Linear Non- Linear 2+ Explanatory Variables Simple Multiple Linear 1 Explanatory Variable

26
EPI 809/Spring Types of Regression Models Regression Models Linear Non- Linear 2+ Explanatory Variables Simple Multiple Linear 1 Explanatory Variable Non- Linear

27
EPI 809/Spring Linear Regression Model

28
EPI 809/Spring Types of Regression Models

29
EPI 809/Spring Linear Equations © T/Maker Co.

30
YX iii 01 Linear Regression Model 1.Relationship Between Variables Is a Linear Function Dependent (Response) Variable (e.g., CD+ c.) Independent (Explanatory) Variable (e.g., Years s. serocon.) Population Slope Population Y-Intercept Random Error

31
EPI 809/Spring Population & Sample Regression Models

32
EPI 809/Spring Population & Sample Regression Models Population

33
EPI 809/Spring Population & Sample Regression Models Unknown Relationship Population

34
EPI 809/Spring Population & Sample Regression Models Unknown Relationship Population Random Sample

35
EPI 809/Spring Population & Sample Regression Models Unknown Relationship Population Random Sample

36
EPI 809/Spring Population Linear Regression Model Observed value i = Random error

37
EPI 809/Spring Sample Linear Regression Model Unsampled observation i = Random error Observed value ^

38
EPI 809/Spring Estimating Parameters: Least Squares Method

39
EPI 809/Spring X Y Scatter plot 1.Plot of All (X i, Y i ) Pairs 2.Suggests How Well Model Will Fit

40
EPI 809/Spring Thinking Challenge How would you draw a line through the points? How do you determine which line ‘fits best’? X Y

41
EPI 809/Spring Thinking Challenge How would you draw a line through the points? How do you determine which line ‘fits best’? X Y Slope changed Intercept unchanged

42
EPI 809/Spring Thinking Challenge How would you draw a line through the points? How do you determine which line ‘fits best’? X Y Slope unchanged Intercept changed

43
EPI 809/Spring Thinking Challenge How would you draw a line through the points? How do you determine which line ‘fits best’? X Y Slope changed Intercept changed

44
EPI 809/Spring Least Squares Least Squares 1.‘Best Fit’ Means Difference Between Actual Y Values & Predicted Y Values Are a Minimum. But Positive Differences Off- Set Negative ones

45
EPI 809/Spring Least Squares Least Squares 1.‘Best Fit’ Means Difference Between Actual Y Values & Predicted Y Values is a Minimum. But Positive Differences Off-Set Negative ones. So square errors!

46
EPI 809/Spring Least Squares Least Squares 1.‘Best Fit’ Means Difference Between Actual Y Values & Predicted Y Values Are a Minimum. But Positive Differences Off- Set Negative. So square errors! 2.LS Minimizes the Sum of the Squared Differences (errors) (SSE)

47
EPI 809/Spring Least Squares Graphically

48
EPI 809/Spring Coefficient Equations Prediction equation Sample slope Sample Y - intercept

49
EPI 809/Spring Derivation of Parameters (1) Least Squares (L-S): Minimize squared error

50
EPI 809/Spring Derivation of Parameters (1) Least Squares (L-S): Minimize squared error

51
EPI 809/Spring Computation Table

52
EPI 809/Spring Interpretation of Coefficients

53
EPI 809/Spring Interpretation of Coefficients 1.Slope ( 1 ) Estimated Y Changes by 1 for Each 1 Unit Increase in X Estimated Y Changes by 1 for Each 1 Unit Increase in X If 1 = 2, then Y Is Expected to Increase by 2 for Each 1 Unit Increase in XIf 1 = 2, then Y Is Expected to Increase by 2 for Each 1 Unit Increase in X ^ ^ ^

54
EPI 809/Spring Interpretation of Coefficients 1.Slope ( 1 ) Estimated Y Changes by 1 for Each 1 Unit Increase in X Estimated Y Changes by 1 for Each 1 Unit Increase in X If 1 = 2, then Y Is Expected to Increase by 2 for Each 1 Unit Increase in XIf 1 = 2, then Y Is Expected to Increase by 2 for Each 1 Unit Increase in X 2.Y-Intercept ( 0 ) Average Value of Y When X = 0 Average Value of Y When X = 0 If 0 = 4, then Average Y Is Expected to Be 4 When X Is 0If 0 = 4, then Average Y Is Expected to Be 4 When X Is 0 ^ ^ ^ ^ ^

55
EPI 809/Spring Parameter Estimation Example Obstetrics: What is the relationship between Mother’s Estriol level & Birthweight using the following data? Estriol Birthweight (mg/24h)(g/1000) (mg/24h)(g/1000)

56
EPI 809/Spring Scatterplot Birthweight vs. Estriol level Birthweight Estriol level

57
EPI 809/Spring Parameter Estimation Solution Table

58
EPI 809/Spring Parameter Estimation Solution

59
EPI 809/Spring Coefficient Interpretation Solution

60
EPI 809/Spring Coefficient Interpretation Solution 1.Slope ( 1 ) Birthweight (Y) Is Expected to Increase by.7 Units for Each 1 unit Increase in Estriol (X) Birthweight (Y) Is Expected to Increase by.7 Units for Each 1 unit Increase in Estriol (X) ^

61
EPI 809/Spring Coefficient Interpretation Solution 1.Slope ( 1 ) Birthweight (Y) Is Expected to Increase by.7 Units for Each 1 unit Increase in Estriol (X) Birthweight (Y) Is Expected to Increase by.7 Units for Each 1 unit Increase in Estriol (X) 2.Intercept ( 0 ) Average Birthweight (Y) Is -.10 Units When Estriol level (X) Is 0 Average Birthweight (Y) Is -.10 Units When Estriol level (X) Is 0 Difficult to explainDifficult to explain The birthweight should always be positiveThe birthweight should always be positive ^ ^

62
EPI 809/Spring SAS codes for fitting a simple linear regression Data BW; /*Reading data in SAS*/ input estriol cards; ; run; PROC REG data=BW; /*Fitting linear regression models*/ model birthw=estriol; run;

63
EPI 809/Spring Parameter Estimates Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept Estriol Parameter Estimation SAS Computer Output 00 ^ 11 ^

64
EPI 809/Spring Parameter Estimation Thinking Challenge You’re a Vet epidemiologist for the county cooperative. You gather the following data: Food (lb.) Milk yield (lb.) What is the relationship between cows’ food intake and milk yield? © T/Maker Co.

65
EPI 809/Spring Scattergram Milk Yield vs. Food intake* M. Yield (lb.) Food intake (lb.)

66
EPI 809/Spring Parameter Estimation Solution Table*

67
EPI 809/Spring Parameter Estimation Solution*

68
EPI 809/Spring Coefficient Interpretation Solution*

69
EPI 809/Spring Coefficient Interpretation Solution* 1.Slope ( 1 ) Milk Yield (Y) Is Expected to Increase by.65 lb. for Each 1 lb. Increase in Food intake (X) Milk Yield (Y) Is Expected to Increase by.65 lb. for Each 1 lb. Increase in Food intake (X) ^

70
EPI 809/Spring Coefficient Interpretation Solution* 1.Slope ( 1 ) Milk Yield (Y) Is Expected to Increase by.65 lb. for Each 1 lb. Increase in Food intake (X) Milk Yield (Y) Is Expected to Increase by.65 lb. for Each 1 lb. Increase in Food intake (X) 2.Y-Intercept ( 0 ) Average Milk yield (Y) Is Expected to Be 0.8 lb. When Food intake (X) Is 0 Average Milk yield (Y) Is Expected to Be 0.8 lb. When Food intake (X) Is 0 ^ ^

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google