ST512 Topic 2 - Multiple linear regression

ST512 Topic 2 - Multiple linear regression - ST512 Topic 2:...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
ST512 Topic 2: Multiple linear regression © K. Gross, 2009 p. 1 Topic 2. Multiple linear regression (MLR) Reading in QK: Section 6.1 Motivation : Just as SLR was used to characterize the relationship between a single predictor and a response, multiple linear regression (MLR) can be used to characterize the relationship between several predictors and a response. Example : BAC data. We also know each individual’s weight and gender: BAC weight gender beers 0.1 132 female 5 0.03 128 female 2 0.19 110 female 9 0.12 192 male 8 ... An SLR shows that there is an effect of weight on BAC also: To simultaneously characterize the effect that the variables “beers” and “weight” have on BAC, we might want to entertain a model with both predictors. In words, the model is BAC = intercept + (parameter associated with beers) * beers + (parameter associated with weight) * weight + error 150 200 250 0.05 0.10 0.15 weight BAC
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ST512 Topic 2: Multiple linear regression p. 2 where (for the moment) we are intentionally vague about the interpretation of the two parameters associated with the predictors. As in SLR, the error term can be interpreted as a catch-all term that includes all the variation not accounted for by the predictors “beers” and “weight”. In notation, the model is 01 1 2 2 ii i i yx x ββ β ε = ++ + Note that to distinguish individual observations, we require a double subscripting of the x ’s, with the first subscript is used to distinguish different predictors and the second subscript used to distinguish individual observations. For example, x 2 i is the value of the 2 nd predictor for the i th observation. There are a variety of ways to think about this model. As in SLR, we can separate this model into a mean component () 12 0 1 1 2 2 , x xx x μ =+ + and an error component i . Note that the mean component is now a function of two variables, and suggests that the relationship between the average response and either predictor is linear. If we wish to make statistical inferences about the parameters 0 , 1 and 2 (which we do), then we need to place the standard assumptions on the error component: independence, constant variance, and normality. In notation, ( ) 2 0, i N σ . We can also think about this model geometrically. Recall that in SLR, we could interpret the SLR model as a line passing through a cloud of data points. With 2 predictors, we are now fitting a plane to data points that “exist” in a three- dimensional data cloud.
Background image of page 2
ST512 Topic 2: Multiple linear regression p. 3 As in SLR, we use the least squares criteria to find the best-fitting parameter estimates. That is to say, we will agree that the best estimates of the parameters 0 β , 1 and 2 are the values that minimize () ( ) 2 2 2 01 1 2 2 11 1 ˆˆ ˆ ˆ nn n ii i i i i i SSE e y y y x x ββ == = ==− = + + ∑∑ R implementation: > fm2<-lm(BAC~beers+weight,data=beer) > summary(fm2) Call: lm(formula = BAC ~ beers + weight, data = beer) Residuals: Min 1Q Median 3Q Max X X * * * * * * * * * * * * * Y * * * * 2 1
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ST512 Topic 2: Multiple linear regression p. 4 -0.0162968 -0.0067796 0.0003985 0.0085287 0.0155621 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 3.986e-02 1.043e-02 3.821 0.00212 ** beers 1.998e-02 1.263e-03 15.817 7.16e-10 *** weight -3.628e-04 5.668e-05
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 48

ST512 Topic 2 - Multiple linear regression - ST512 Topic 2:...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online