Lack-of-Fit Test (F-Test from Replicate Observations)
Compares model mis-specification against pure noise from replicated design points.
Description
When a design contains replicates (multiple observations at the same design point), the residual sum of squares SSE can be decomposed into pure-error (SS_PE — within-replicate-group scatter, model-independent) and lack-of-fit (SS_LoF — anything the model fails to explain beyond pure noise). The F-test compares the mean lack-of-fit against pure error. A significant result means the model is mis-specified; a term type is missing (often a quadratic or interaction term). Required diagnostic in Six-Sigma RSM practice: without replicates, LoF cannot be assessed.
Formulas
Assumptions
- At least one replicate group of size ≥ 2 (else df_PE = 0)
- Number of unique design points exceeds the number of model parameters (else df_LoF ≤ 0)
- Residuals are independent and approximately normal (standard ANOVA assumptions)
Limitations
- Cannot run without replicates — the implementation returns null
- When replicates agree exactly (MS_PE = 0): convention F = ∞, p = 0 if MS_LoF > 0; F = 0, p = 1 otherwise
References
- Montgomery, D.C. (2017). Design and Analysis of Experiments, 9th Ed., Wiley — Chapter 11 (Response Surface Methods)
- Myers, R.H., Montgomery, D.C., Anderson-Cook, C.M. (2016). Response Surface Methodology, 4th Ed., Wiley — Chapter 2.4 (Lack of Fit Testing)