# Why is Variance Inflation Factors(VIF) in Gretl and Statmodels different?

I have 3 variables R&D Spend, Administration and Marketing spends. I wanted to calculate VIF and eliminate a variable for better fit to the model.

I tried to use the solution at https://stats.stackexchange.com/questions/155028/how-to-systematically-remove-collinear-variables-in-python

[8.3845707545599613, 4.0264055178945535, 7.5939835926809236]
dropping 'R&D Spend' at index: 0
[3.4365296868536528, 3.4365296868536528]
Remaining variables:


on the same data

Gretl Output:

Variance Inflation Factors
Minimum possible value = 1.0
Values > 10.0 may indicate a collinearity problem

RDSpend    2.469
MarketingSpend    2.327
VIF(j) = 1/(1 - R(j)^2), where R(j) is the multiple correlation coefficient
between variable j and the other independent variables

• statsmodels vif uses the raw data and does not do any scaling or standardizing. It was written as a diagnostic tool for a given design matrix. Gretl might standardize the variables. – Josef Aug 18 '17 at 14:03
• Thanks but do you know any link where reference to scaling is done? Also, if true which kind of scaling. – Saqib Mujtaba Aug 21 '17 at 7:07
• I don't know Gretl except for having run a few examples. You need to check their documentation, or try to replicate their results using different scaling or standardization. – Josef Aug 21 '17 at 14:23