Handbook of Regression Analysis With Applications in R. Samprit Chatterjee
Чтение книги онлайн.
Читать онлайн книгу Handbook of Regression Analysis With Applications in R - Samprit Chatterjee страница 12
![Handbook of Regression Analysis With Applications in R - Samprit Chatterjee Handbook of Regression Analysis With Applications in R - Samprit Chatterjee](/cover_pre848485.jpg)
FIGURE 1.1: The simple linear regression model. The solid line corresponds to the true regression line, and the dotted lines correspond to the random errors
The special case of (1.1) with
1.2.2 ESTIMATION USING LEAST SQUARES
The true regression function represents the expected relationship between the target and the predictor variables, which is unknown. A primary goal of a regression analysis is to estimate this relationship, or equivalently, to estimate the unknown parameters
Figure 1.2 gives a graphical representation of least squares that is based on Figure 1.1. Now the true regression line is represented by the gray line, and the solid black line is the estimated regression line, designed to estimate the (unknown) gray line as closely as possible. For any choice of estimated parameters
FIGURE 1.2: Least squares estimation for the simple linear regression model, using the same data as in Figure 1.1. The gray line corresponds to the true regression line, the solid black line corresponds to the fitted least squares line (designed to estimate the gray line), and the lengths of the dotted lines correspond to the residuals. The sum of squared values of the lengths of the dotted lines is minimized by the solid black line.
and is called the fitted value. The difference between the observed value
In higher dimensions (
FIGURE 1.3: Least squares estimation for the multiple linear regression model with two predictors. The plane corresponds to the fitted least squares relationship, and the lengths of the vertical lines correspond to the residuals. The sum of squared values of the lengths of the vertical lines is minimized by the plane.
The linear regression model can be written compactly using matrix notation. Define the following matrix and vectors as follows:
The regression model (1.1) is then
(1.3)
The normal equations [which determine the minimizer of 1.2] can be shown (using multivariate calculus) to be
which implies that the least squares estimates satisfy
(1.4)
The fitted values are then
(1.5)
where