Book contents
- Frontmatter
- Dedication
- Contents
- Preface
- Content-how the chapters fit together
- 1 A brief introduction to R
- 2 Styles of data analysis
- 3 Statistical models
- 4 A review of inference concepts
- 5 Regression with a single predictor
- 6 Multiple linear regression
- 7 Exploiting the linear model framework
- 8 Generalized linear models and survival analysis
- 9 Time series models
- 10 Multi-level models and repeated measures
- 11 Tree-based classification and regression
- 12 Multivariate data exploration and discrimination
- 13 Regression on principal component or discriminant scores
- 14 The R system – additional topics
- 15 Graphs in R
- Epilogue
- References
- Index of R symbols and functions
- Index of terms
- Index of authors
- Plate Section
6 - Multiple linear regression
Published online by Cambridge University Press: 05 October 2013
- Frontmatter
- Dedication
- Contents
- Preface
- Content-how the chapters fit together
- 1 A brief introduction to R
- 2 Styles of data analysis
- 3 Statistical models
- 4 A review of inference concepts
- 5 Regression with a single predictor
- 6 Multiple linear regression
- 7 Exploiting the linear model framework
- 8 Generalized linear models and survival analysis
- 9 Time series models
- 10 Multi-level models and repeated measures
- 11 Tree-based classification and regression
- 12 Multivariate data exploration and discrimination
- 13 Regression on principal component or discriminant scores
- 14 The R system – additional topics
- 15 Graphs in R
- Epilogue
- References
- Index of R symbols and functions
- Index of terms
- Index of authors
- Plate Section
Summary
In straight line regression, a response variable y is regressed on a single explanatory variable x. Multiple linear regression generalizes this methodology to allow multiple explanatory or predictor variables. The focus may be on accurate prediction. Or it may, alternatively or additionally, be on the regression coefficients themselves. Be warned that interpreting the regression coefficients is not as straightforward as it might appear.
The discussion will emphasize the use of model diagnostics, and of graphs that give insight into the model fit. Diagnostic checks are intended to assist in the tuning of models so that they perform well when used for their intended purpose, and do not give unexpected and perhaps unpleasant surprises. For example, a model fit that is unduly affected by influential outliers may give results that are less than satisfactory with the main body of the data. This is one of several common types of departure from model assumptions that diagnostic checks may bring to attention.
Basic ideas: a book weight example
The book weight example has two x-variables in the regression equation. In the data shown in Figure 6.1 and printed to the right of the figure, seven books with hardback covers have been added to the eight softbacks. Code for the figure is:
## Plot weight vs volume: data frame allbacks (DAAG)
plot(weight ˜ volume, data=allbacks, pch=c(16,1)[unclass(cover)])
# unclass(cover) gives the integer codes that identify levels with(allbacks, text(weight ˜ volume, labels=paste(1:15), pos=c(2,4)[unclass(cover)]))
Explanatory variables are the volume of the book ignoring the covers, and the total area of the front and back covers.
- Type
- Chapter
- Information
- Data Analysis and Graphics Using RAn Example-Based Approach, pp. 170 - 216Publisher: Cambridge University PressPrint publication year: 2010