Biometry Lecture 08 Simple Linear Regression

2y ago
43 Views
2 Downloads
640.28 KB
29 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Halle Mcleod
Transcription

Linear Regression Linear regression with one predictor Assess the fit of a regression model––––Total sum of squaresModel sum of squaresResidual sum of squaresR2 Test for model significance – F test Interpret a regression modelSlide 1

What is Regression? A way of predicting the value of onevariable from another.– It is a hypothetical model of the relationshipbetween two variables.– The model used is a linear one.– Therefore, we describe the relationship usingthe equation of a straight line.Slide 2

Assumptions of Simple LinearRegression For each value of x, Y are randomly sampledand independent. For any value of X in the pop’l there exists anormal distribution of Y values There is homogeneity of variances in thepopulation. ie. the variance of the normaldistribut. of Y values in pop’l are equal for allof values of x. The relationship of x and y is linear. X is measured without error

Describing a Straight Line bi– Regression coefficient for the predictor– Gradient (slope) of the regression line– Direction/strength of relationship b0– Intercept (value of Y when X 0)– Point at which the regression line crosses the Y‐axis (ordinate)Slide 4

Intercepts and Gradients

The Method of Least SquaresSlide 6This graph shows a scatterplot of some data with a line representing the general trend. Thevertical lines (dotted) represent the differences (or residuals) between the line and the actualdata

How Good Is the Model? The regression line is a model based onthe data. This model might not reflect reality.– We need some way of testing how well themodel fits the observed data.– How?Slide 7

Sums of SquaresSST uses the differencesbetween the observed dataand the mean value of YSSR uses the differencesbetween the observed dataand the regression lineSSM uses the differencesbetween the mean value of Yand the regression lineSlide 8Diagram showing from where the regression sums of squares derive

Total SS (SST) SST– Total variability (variability betweenscores and the mean). TSS is the sum of the squaredresiduals when the most basicmodel is applied to the data. How good is the mean as amodel to the observed data?Slide 9

Total SS (SST) SST– Total variability(variability betweenscores and themean).Slide 10

Residual SS or Error SS (SSR) SSR– Residual/error variability(variability between theregression model and theactual data). Difference betweenthe observed dataand the model This represents thedegree of inaccuracywhen fitting the bestfit model to the data.Slide 11

Residual SS SSR– Residual/errorvariability (variabilitybetween theregression model andthe actual data).Slide 12

Model SS or Regression SS (SSM) Slide 13SSM– Model variability (difference invariability between the model andthe mean).This is the improvement we get fromfitting the model to the data relative tothe null model.

SST SSR SSM How to we get large SSM? What happens if the SSM is large? Regression model is much different fromusing the mean as the outcome, thereforeregression model improves the outcome. So, we can calculate the proportion ofimprovement due to the model. SSM/SST, percentage of variation explainedby the model.

Testing the Model: ANOVASSTTotal Variance in the DataSSMSSRImprovement Due to the ModelError in Model If the model results in better prediction than using themean, then we expect SSM to be much greater than SSR SST SSM SSRSlide 15

Evaluating the quality of the Model: R2 R2– The proportion of variance accounted for bythe regression model.– The Pearson Correlation Coefficient SquaredSlide 16

SS for model testing A second use of the sum of squares valuesis to test the model. Evaluate the amount of systematic variance(regression) divided by the amount ofunsystematic (residual) variance. The magnitude of the sum of squares isdependent on the number of observations

SS for model testing

SS for model testing F test – “termed variance ratio test”1. We divide the SSM and SSR by theirrespective degrees of freedom (DF).– DF for SSM is the number of parameters in themodel.– DF for SSR number of obs – number ofparameters in the model.

Degrees of freedom Given a statistic (mean, var) and samplesize of a population. DF are the number of terms that areindependent, such that when any of theother terms are known, the value can beestimated.

Testing the Model: ANOVA Mean squared error– Sums of squares are total values.– They can be expressed as averages, divided byDF terms.– These are called mean squares, MS.Slide 21

Worked example TSS Model SS

Worked exampleDF for Regression (model DF) is 1 in simple linear regressionResidual DF (Error DF) is equal n ‐ 2

Worked example

Regression: An Example A record company boss was interested inpredicting record sales from advertising. Data– 200 different album releases Outcome variable:– Sales (CDs and downloads) in the week afterrelease Predictor variable:– The amount (in units of 1000) spent promotingthe record before release.

Output of a Simple Regression In R:summary(albumSales.1) Coefficients:EstimateStd. Error t value(Intercept) 1.341e 02 7.537e 00 17.799adverts9.612e‐02 9.632e‐03 9.979Pr( t ) 2e‐16 *** 2e‐16 ***Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1Residual standard error: 65.99 on 198 degrees of freedomMultiple R‐squared: 0.3346, Adjusted R‐squared: 0.3313F‐statistic: 99.59 on 1 and 198 DF, p‐value: 2.2e‐16

Using the ModelSlide 29

Linear Regression Linear regression with one predictor Assess the fit of a regression model –Total sum of squares –Model sum of squares –Residual sum of squares –R2 Test . Microsoft PowerPoint - Biometry Lec

Related Documents:

Introduction of Chemical Reaction Engineering Introduction about Chemical Engineering 0:31:15 0:31:09. Lecture 14 Lecture 15 Lecture 16 Lecture 17 Lecture 18 Lecture 19 Lecture 20 Lecture 21 Lecture 22 Lecture 23 Lecture 24 Lecture 25 Lecture 26 Lecture 27 Lecture 28 Lecture

Lecture 1: A Beginner's Guide Lecture 2: Introduction to Programming Lecture 3: Introduction to C, structure of C programming Lecture 4: Elements of C Lecture 5: Variables, Statements, Expressions Lecture 6: Input-Output in C Lecture 7: Formatted Input-Output Lecture 8: Operators Lecture 9: Operators continued

Lecture 1: Introduction and Orientation. Lecture 2: Overview of Electronic Materials . Lecture 3: Free electron Fermi gas . Lecture 4: Energy bands . Lecture 5: Carrier Concentration in Semiconductors . Lecture 6: Shallow dopants and Deep -level traps . Lecture 7: Silicon Materials . Lecture 8: Oxidation. Lecture

TOEFL Listening Lecture 35 184 TOEFL Listening Lecture 36 189 TOEFL Listening Lecture 37 194 TOEFL Listening Lecture 38 199 TOEFL Listening Lecture 39 204 TOEFL Listening Lecture 40 209 TOEFL Listening Lecture 41 214 TOEFL Listening Lecture 42 219 TOEFL Listening Lecture 43 225 COPYRIGHT 2016

Partial Di erential Equations MSO-203-B T. Muthukumar tmk@iitk.ac.in November 14, 2019 T. Muthukumar tmk@iitk.ac.in Partial Di erential EquationsMSO-203-B November 14, 2019 1/193 1 First Week Lecture One Lecture Two Lecture Three Lecture Four 2 Second Week Lecture Five Lecture Six 3 Third Week Lecture Seven Lecture Eight 4 Fourth Week Lecture .

Lecture 1: Linear regression: A basic data analytic tool Lecture 2: Regularization: Constraining the solution Lecture 3: Kernel Method: Enabling nonlinearity Lecture 1: Linear Regression Linear Regression Notation Loss Function Solving the Regression Problem Geome

SKF Linear Motion linear rail INA Linear SKF Linear Motion Star Linear Thomson Linear linear sysTems Bishop-Wisecarver INA Linear Pacific Bearing Thomson Linear mecHanical acTuaTors Duff-Norton Joyce/Dayton Nook Industries Precision mecHanical comPonenTs PIC Design Stock Drive Product

ARALING PANLIPUNAN - GRADE 5 Ikalawang Markahan Kahulugan at Layunin ng Kolonyalismo Ang Dahilan ng Espanya sa Pananakop ng Pilipinas Pananakop ng Espanya sa Pilipinas Ang Paglalayag ni Ferdinand Magellan Labanan sa Mactan Ang Ekspedisyon nina Loaisa, Cabot, Saavedra at Villalobos Ekspedisyon ng Legazpi Mga Unang Engkwentro sa Pagitan ng mga Espanyol at Pilipino Kristiyanismo sa Buhay ng mga .