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
5 - Regression with a single predictor
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
Data for which the models of this chapter may be appropriate can be displayed as a scatterplot. The focus will be on the straight line model, though the use of transformations makes it possible to accommodate specific forms of non-linear relationship within this framework. By convention, the x-variable, plotted on the horizontal axis, has the role of explanatory variable. The y-variable, plotted on the vertical axis, has the role of response or outcome variable.
Many of the issues that arise for these simple regression models are fundamental to any study of regression methods. Various special applications of linear regression raise their own specific issues. One such special application, discussed in Subsection 5.6.2, is to size and shape data.
Scrutiny of the scatterplot should precede regression calculations. Such a plot may indicate that the intended regression is plausible, or it may reveal unexpected features.
If there are many observations, it is often useful to compare the fitted line with a fitted smooth curve. If this differs substantially from an intended line, then straight line regression may be inappropriate, as in Figure 2.6. The fitting of such smooth curves will be a major focus of Chapter 7.
Fitting a line to data
How accurate is the line?
Application of the summary function to an lm object from a straight line regression, as in Subsection 5.1.1 following, gives a standard error for each of a and b. Standard errors of predicted values may also or alternatively be of interest; we defer discussion of these until Section 5.3. Determination of these standard errors requires the specific statistical assumptions that will now be noted.
- Type
- Chapter
- Information
- Data Analysis and Graphics Using RAn Example-Based Approach, pp. 142 - 169Publisher: Cambridge University PressPrint publication year: 2010