Panda > Statsmodel: syntax errors implementing variance_inflation_factor
<p>I am "using" <code>Statsmodel</code>for less than 2 days and am not at all familiar with the import commands etc. I want to run a simple <code>variance_inflation_factor</code> from <a href="http://statsmodels.sourceforge.net/devel/generated/statsmodels.stats.outliers_influence.variance_inflation_factor.html" rel="nofollow">here</a> but am having some issues. My code follows:</p>

<pre><code>from numpy import *
import numpy as np
import pandas as pd
from pandas import DataFrame, Series
import statsmodels.formula.api as sm
from sklearn.linear_model import LinearRegression
import scipy, scipy.stats
import matplotlib.pyplot as plt
import matplotlib
matplotlib.style.use('ggplot')
from statsmodels.api import add_constant
from numpy import linalg as LA
import statsmodels as sm

## I have been adding libraries and modules/packages with the intention of erring on the side of caution 

a = df1.years_exp
b = df1.leg_totalbills
c = df1.log_diff_rgdp
d = df1.unemployment
e = df1.expendituresfor
f = df1.direct_expenditures
g = df1.indirect_expenditures

sm.variance_inflation_factor((['a', 'b', 'c', 'd', 'e', 'f']), g)

then I get the following error:

AttributeError                            Traceback (most recent call last)
&lt;ipython-input-61-bb126535eadd&gt; in &lt;module&gt;()
----&gt; 1 sm.variance_inflation_factor((['a', 'b', 'c', 'd', 'e', 'f']), g)

AttributeError: module 'statsmodels' has no attribute 'variance_inflation_factor'
</code></pre>

<p>Can someone direct me to the proper syntax for loading and executing this module? If it is more convenient that I post a link to some source code please ask. However, I have a feeling that this is just a simple syntax issue.</p>