Download presentation
Presentation is loading. Please wait.
Published byGilbert Young Modified over 8 years ago
1
1 Linear Regression Model
2
2 Types of Regression Models
3
EPI 809/Spring 20083 Linear Equations © 1984-1994 T/Maker Co.
4
YX iii 01 Linear Regression Model 1.Relationship Between Variables In a Linear Function Dependent (Response) Variable (e.g., income.) Independent (Explanatory) Variable (e.g., age) Population Slope Population Y-Intercept Random Error
5
EPI 809/Spring 20085 Population & Sample Regression Models
6
EPI 809/Spring 20086 Population & Sample Regression Models Population
7
EPI 809/Spring 20087 Population & Sample Regression Models Unknown Relationship Population
8
EPI 809/Spring 20088 Population & Sample Regression Models Unknown Relationship Population Random Sample
9
EPI 809/Spring 20089 Population & Sample Regression Models Unknown Relationship Population Random Sample
10
EPI 809/Spring 200810 Population Linear Regression Model Observed value i = Random error
11
EPI 809/Spring 200811 Sample Linear Regression Model Unsampled observation i = Random error Observed value ^
12
EPI 809/Spring 200812 Estimating Parameters: Least Squares Method
13
EPI 809/Spring 200813 0 20 40 60 0204060 X Y Scatter plot 1.Plot of All (X i, Y i ) Pairs 2.Suggests How Well Model Will Fit
14
EPI 809/Spring 200814 Thinking Challenge How would you draw a line through the points? How do you determine which line ‘fits best’? 0 20 40 60 0204060 X Y
15
EPI 809/Spring 200815 Thinking Challenge How would you draw a line through the points? How do you determine which line ‘fits best’? 0 20 40 60 0204060 X Y Slope changed Intercept unchanged
16
EPI 809/Spring 200816 Thinking Challenge How would you draw a line through the points? How do you determine which line ‘fits best’? 0 20 40 60 0204060 X Y Slope unchanged Intercept changed
17
EPI 809/Spring 200817 Thinking Challenge How would you draw a line through the points? How do you determine which line ‘fits best’? 0 20 40 60 0204060 X Y Slope changed Intercept changed
18
EPI 809/Spring 200818 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
19
EPI 809/Spring 200819 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!
20
EPI 809/Spring 200820 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)
21
EPI 809/Spring 200821 Least Squares Graphically
22
EPI 809/Spring 200822 Coefficient Equations Prediction equation Sample slope Sample Y - intercept
23
EPI 809/Spring 200823 Derivation of Parameters (1) Least Squares (L-S): Minimize squared error
24
EPI 809/Spring 200824 Derivation of Parameters (1) Least Squares (L-S): Minimize squared error MULTIPLY BOTH SIDES BY (x –xbar)
25
EPI 809/Spring 200825 Computation Table
26
EPI 809/Spring 200826 Interpretation of Coefficients
27
EPI 809/Spring 200827 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 ^ ^ ^
28
EPI 809/Spring 200828 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 ^ ^ ^ ^ ^
29
EPI 809/Spring 200829 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) 11 21 32 42 54 11 21 32 42 54
30
EPI 809/Spring 200830 Scatterplot Birthweight vs. Estriol level Birthweight Estriol level
31
EPI 809/Spring 200831 Parameter Estimation Solution Table
32
EPI 809/Spring 200832 Parameter Estimation Solution Follows from slide 24.
33
EPI 809/Spring 200833 Coefficient Interpretation Solution
34
EPI 809/Spring 200834 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) ^
35
EPI 809/Spring 200835 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 ^ ^
36
EPI 809/Spring 200836 SAS codes for fitting a simple linear regression Data BW; /*Reading data in SAS*/ input estriol birthw@@; cards; 11 21 32 42 54 ; run; PROC REG data=BW; /*Fitting linear regression models*/ model birthw=estriol; run;
37
EPI 809/Spring 200837 Parameter Estimates Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept 1 -0.10000 0.63509 -0.16 0.8849 Estriol 1 0.70000 0.19149 3.66 0.0354 Parameter Estimation SAS Computer Output 00 ^ 11 ^
38
EPI 809/Spring 200838 Parameter Estimation Thinking Challenge You’re a Vet epidemiologist for the county cooperative. You gather the following data: Food (lb.) Milk yield (lb.) 43.0 65.5 106.5 129.0 What is the relationship between cows’ food intake and milk yield? © 1984-1994 T/Maker Co.
39
EPI 809/Spring 200839 Scattergram Milk Yield vs. Food intake* M. Yield (lb.) Food intake (lb.)
40
EPI 809/Spring 200840 Parameter Estimation Solution Table*
41
EPI 809/Spring 200841 Parameter Estimation Solution*
42
EPI 809/Spring 200842 Coefficient Interpretation Solution*
43
EPI 809/Spring 200843 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) ^
44
EPI 809/Spring 200844 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
© 2025 SlidePlayer.com. Inc.
All rights reserved.