# Linear Regression Model-Part 2

In my previous article, we went over the model fitting for the given data of percentage of hardwood pulp in the paper(X) and the tensile strength of the paper (Y).

Once we have established the significance of the regression model and the estimated of the population parameters of the model, we then have to analyze the trends of the residuals to verify the assumptions of the linear regression model. We run the following R code to obtain a series if insightful plots as discussed below.

Note: The assumptions of the linear regression plots cannot be completely met, but we are examining if those assumptions are relatively met for us to use this analysis and continue with the regression model.
Although, we can always plot the observed value and check for the linearity (in case of simple linear regression) because we would have only two variables. But, while fitting multiple linear regression, we would have multiple regressors and hence, that scatter plot is harder to obtain and analyze, in that case, these residual plots play a vital role.

R code for obtaining the Diagnostic Model plots:
> plot(model)

*model refers to the variable that stores the linear regression model built in R (from the previous article)

Checking the Linearity Assumption

According to the theory, the plot of the Residuals v/s Fitted Values for a decent/predictive/good model should be random in nature. As seen from the plot above, the plot is random in nature and doesn’t portray any trend, like, an upwards sloping line/ a downward sloping line/ cyclic nature etc. Also, with reference to the vertical axis, we see that the values of the residuals should be concentrated around the mean value of the residuals, i.e., 0 (stemming from the assumption, Errors ~ N(0,1)).

Although the red line should be fairly flat (or along the x=0 line) it is not the case here.

Normal QQ plot

Since one of the assumptions of the Linear regression model is the normality of the residuals, this plot gives us an understanding of the QQ plot for the residuals. It plots the Standardized residuals of the model against the Theoretical Quantiles. Once we obtain the observed plots on the straight 45 degree line, we can safely conclude that the residuals obey normality. (as also discussed in the article Testing for Normality)