# Lack-of-fit Test

Consider the two data sets in Figure 13. The Y1 data set shows a potential linear relationship, while the Y2 data set may have some better relationships other than linear. Both data sets show significant statistical linear relationship (p-value <0.001) with strong r-square values (over 85%), indicating satisfactory regression analysis (Figure 14 and Figure 15). A lack-of-fit test will determine if there is any other relationship that fits the model better than what is predicted and included in the analysis. Is there any other term missing from the regression model that would fit the model better? Is there anything missing from the regression model? Without the lack-of-fit tests, very satisfactory linear relationships would be made for both data sets in Figure 13. However, the lack-of-fit test for the Y2 data set indicates that there is a lack-of-fit of the regression model, meaning that there is a statistically better relationship other than the linear relationship exists between the dependent and the independent variables (Figure 15). The data set Y1 shows no lack-of-fit, meaning that the Y1 data set shows that the linear model fits fine without suffering from any lack of fit.

Lack of fit test requires repeated observations for at least a few x-values to estimate the pure error for these repeated observations. If the within variation (pure error) of the repeated observations is large as compared to the between observations, no statistical lack of fit exists in the model. If the between observation error is large as compared to the within variation, there could be something else going on in the relationship between the dependent and the independent variables. Figure 13. Lack-of-Fit of Data Comparison Figure 14. Regression Analysis for Y1 Data Set Figure 15. Regression Analysis for y2 Data Set

# How to Conduct Lack of Fit Test

Most software will produce the lack-of-fit test automatically if there is repeated observations in the data. Using MS Excel and Minitab, following video shows regression analysis (lack-of-fit is automatically produced).