*! version 1.0.0 09jun2026

Title

xttestpanel vif -- Multicollinearity diagnostics for panel-data models

Syntax

xttestpanel vif [depvar indepvars] [if] [in]
[, model(fe|re) graph]

Postestimation form (no varlist) reuses the last xtreg; see
the overview.

Description

xttestpanel vif reports collinearity diagnostics on the (within-transformed for
fe) design matrix:

o VIF - the classical variance inflation factor,
VIF_j = 1/(1 - R2_j), equivalently the j-th diagonal of the inverse correlation
matrix of the regressors. For fe the regressors are first within-group demeaned,
giving the within-group VIF that is relevant for the FE estimator.

o Robust VIF (RVIF) - the robust diagnostic of Ismaeel, Midi &
Sani (2021). High-leverage collinearity-enhancing observations (HLCEOs) can mask or
manufacture collinearity in the ordinary VIF. The RVIF re-computes the VIF from a
robust (Huber-weighted) correlation matrix that down-weights high-leverage points, so
a gap between VIF and RVIF reveals leverage-driven collinearity.

The tolerance 1/VIF is also printed. Rule of thumb: VIF > 10 (tolerance
< 0.1) indicates serious collinearity.

Options

model(fe|re) design used; fe within-demeans the regressors
(default).

graph horizontal bar chart of VIF and robust VIF with the threshold line
at 10.

Stored results

r(vif) row vector of VIFs

r(rvif) row vector of robust VIFs

r(mean_vif) mean VIF

r(mean_rvif) mean robust VIF

Examples

. xttestpanel vif ln_wage age tenure hours, graph

. xtreg ln_wage age tenure hours, fe

. xttestpanel vif

References

Ismaeel, S.S., H. Midi, and M. Sani. 2021. Malaysian Journal of Fundamental
and Applied Sciences 17: 636-646.

Author

Merwan Roudane - merwanroudane920@gmail.com -
github.com/merwanroudane