sas jmp中对失拟检验的一点资料:供参考
SAS JMP中,“失拟合”表给出了一个特殊的诊断检验,并且只有在数据和模型适宜时才出现。其原理为有时可以在不管模型形式是否正确的情况下估计误差方差。如果观测值对于变量 X 而言彼此完全重复,就会出现这种情况。可将这些完全重复值测量的误差称为纯误差。不管模型使用的是什么样的 X 变量形式,都无法解释或预测的样本误差的全部。但是,如果自由度很少,即很少重复的 x 值,则失拟合检验可能用处不大。
模型残差和纯误差之间的差称为失拟合误差。如果某些回归量的函数形式错误,或方差分析模型中交互作用效应太少,失拟合误差可显著大于纯误差。这种情况下,应考虑添加交互作用项(如果需要),或尝试较好地获取回归量的函数形式。
没有失拟合检验的情况通常有以下两种:
相对于 X 数据没有完全重复点,因此纯误差没有自由度。
模型达到饱和,意味着该模型本身的每个不同 x 值都有一个自由度,因此失拟合没有自由度。
To use SPSS for the Lack of fit test go to: Analyze>>Compare Means>>Means.
Then in the dialogue box that appears assign your Independent and Dependent Variables. Select Options and a new dialogue box will appear. Check the option at the bottom of the screen that says "Test for Linearity".
The SPSS way can also be the R way: Starting with Version 16, SPSS offers a free plug-in that lets users run R code within SPSS having full access to the active SPSS Statistics data, and writing its output to the SPSS Statistics Viewer, please read the following for detail: