D.eviance is a generalization of the residual sum of squares. It measures the goodness of fit compared to a saturated model.
模范的偏差M.1模型的Loglikelihie之间是两倍的差异M.1和饱和的模型M.S.。饱和模型是一种模型,具有最大参数数量的模型。
For example, if you haveN.观察(y一世那一世=1那2那。。。那N.)具有潜在不同的价值X一世T.β,然后您可以定义饱和模型N.P.arameters. LetL.(B.那y)表示具有参数的模型的似然函数的最大值B.。T.hen the deviance of the modelM.1是
在哪里B.1andB.S.contain the estimated parameters for the modelM.1和饱和的模型那respectively. The deviance has a chi-square distribution withN.-P.degrees of freedom, whereN.是饱和模型中的参数数量和P.是the number of parameters in the modelM.1。
假设您有两个不同的广义线性回归模型M.1andM.2那andM.1has a subset of the terms inM.2。You can assess the fit of the models by comparing the deviancesD.1andD.2两种模型。偏离的差异是
Asymptotically, the differenceD.has a chi-square distribution with degrees of freedomV.equal to the difference in the number of parameters estimated inM.1andM.2。You can obtain theP.- 通过使用来进行此测试1 - CHI2CDF(D,V)
。
T.yP.一世cally, you examineD.使用模型M.2持续期限,没有预测因子。所以,D.has a chi-square distribution withP.- 1degrees of freedom. If the dispersion is estimated, the difference divided by the estimated dispersion has anF分销P.- 1N.umerator degrees of freedom andN.-P.分母自由度。