lofrtest
This m-file provides a statistical test that gives information on the form of the model under consideration. A significant lack-of-fit suggest that there may be some systematic variation unaccounted for in the hypothesized model (chosen model does not well describe the data). It arises when there are exact replicate values of the independent variable in the model that provide an estimate of pure error. Pure error is in essence the amount of error that cannot be accounted for by any model. Then allows a test on whether there is error present aside from pure error. For the construction of the lack-of-fit test we need to examine three common types of linear models:
- single mean (one parameter)
- slope and intercept or common regression model (two parameters)
- separate means for each x-value or one-way ANOVA (many parameters).
So, the pure error is the error of the separate means on ANOVA and the total error in the residual resulting in the regression analysis. So, the lack-of-fit results to be the difference between this two sources of error,
SS(LOF) = SSR(Model) - SSE(ANOVA).
It needs to input D-matrix data (=[X Y]) (last column must be the Y-dependent variable). (X-independent variable entry can be for a simple [X], multiple [X1,X2,X3,...Xp] or polynomial [X,X^2,X^3,...,X^p] regression model.), and alpha-significance level (default = 0.05).
It outputs a complete summary (table) of analysis of variance partitioning sources of variation for testing lack-of-fit.
引用格式
Antonio Trujillo-Ortiz (2025). lofrtest (https://www.mathworks.com/matlabcentral/fileexchange/7074-lofrtest), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0.0 | Text was improved. |