title: anova_lm() python: on which model type does it work?
body: <p>I am new to Python and trying to transition to a unique platform, Python, from Matlab+R platforms.</p>
  
  <p>I need to do a regression of my data. </p>
  
  <p>After reading what is available online - unfortunately not as numerous as for R just yet - I realized that I need to play with the following options:</p>
  
  <pre><code>import statsmodels.api as sm
  import statsmodels.formula.api as smf
  
  mod1 = smf.glm(formula=formula_new, data=dta_new, family=sm.families.Gaussian())
  mod2 = smf.ols(formula=formula_new, data=dta_new, family=sm.families.Gaussian())
  mod3 = sm.OLS.from_formula(formula=formula_new, data=dta_new)
  </code></pre>
  
  <p>all three give me similar results.
  What I really want to know is if there exists a function similar to <code>anova()</code> from R (with a nice table summarizing the comparison of different models, or within a model for different variables, as shown here <a href="http://www.r-bloggers.com/r-tutorial-series-anova-tables/" rel="nofollow">http://www.r-bloggers.com/r-tutorial-series-anova-tables/</a> ) for any of these model options.</p>
  
  <p>I tried to run </p>
  
  <pre><code>table = sm.stats.anova_lm(modX)
  print table
  </code></pre>
  
  <p>with X = 1,2,3, basically for all models (those coming from smf. or sm.) but I always get the same error:</p>
  
  <pre><code>AttributeError: 'OLS'/'GLM' object has no attribute 'model'
  </code></pre>
  
  <p>with OLS or GLM depending on the type of model.</p>
  
  <p>thanks for any input. am I not importing correctly modules? I am confused.</p>
  
  <p>Links to applications/examples/tutorials of python are welcome.</p>
  
  <p>rpy2 is not an option on my server, I am working on getting R3.0 installed, but it might take a while.</p>