[R]car::vif() : VIF(分散拡大要因)を計算する関数

説明

線形モデルおよび一般化線形モデルに対するVIFおよび一般化VIFを計算する

使用法

vif(mod, …)

引数

mod : coef、vcov、model.matrixに対応するオブジェクト(lm、glmオブジェクトなど)

: 使用されない

詳細

重み付けなしの線形モデルに含まれる全ての項の自由度が1である場合、通常のVIFが計算される。
重み付けなしの線形モデルに含まれるいずれかの項の自由度が1でない場合、一般化VIF(Fox and Monette, 1992)が計算される。

一般化VIFは以下のように解釈可能である。

These are interpretable as the inflation in size of the confidence ellipse or ellipsoid for the coefficients of the term in comparison with what would be obtained for orthogonal data.The generalized vifs are invariant with respect to the coding of the terms in the model (as long as the subspace of the columns of the model matrix pertaining to each term is invariant). To adjust for the dimension of the confidence ellipsoid, the function also prints GVIF^[1/(2*df)] where df is the degrees of freedom associated with the term.

更なる一般化により、ここでの実装は他の種類のモデル、特に重み付けあり線形モデルや重み付けあり一般化線形モデルにも適用可能である。

返り値

VIFのベクトル。あるいはモデルの中の各項に対応する1つの行およびGVIFおよびGVIFGVIF^[1/(2*df)]に対応する列を含む行列。

使用例

 


> head(Duncan)
type income education prestigeaccountant 
prof     62        86       82pilot      
prof     72        76       83architect  
prof     75        92       90author     
prof     55        90       76chemist    
prof     64        86       90minister   
prof     21        84       87

> example(vif)
vif> vif(lm(prestige ~ income + education, data=Duncan))   income education    2.1049    2.1049 
vif> vif(lm(prestige ~ income + education + type, data=Duncan))              GVIF Df GVIF^(1/(2*Df))income    2.209178  1        1.486330education 5.297584  1        2.301648type      5.098592  2        1.502666>

関連

VIF(variance inflation factor)

コメント