title: Python Statsmodels Testing Coefficients from Robust Linear Model based on M-Estimators
body: <p>I have a linear model that I'm trying to fit to data with a good # of outliers in the endogenous variable, but not in the exogenous space.  I've researched that RLM's based on M-estimators are good in this situation.</p>
  
  <p>When I fit an RLM to my data in the follow way:</p>
  
  <pre><code>import numpy as np
  import statsmodels.formula.api as smf
  import statsmodels as sm
  
  modelspec = ('cost ~ np.log(units) + np.log(units):item + item') #where item is a categorical variable
  results = smf.rlm(modelspec, data = dataset, M = sm.robust.norms.TukeyBiweight()).fit()
  print results.summary()
  </code></pre>
  
  <p>the summary results shows a z statistic, and seemingly the coefficient test of significance is based off of this rather than a t statistic.  However, the following R manual (<a href="http://www.dst.unive.it/rsr/BelVenTutorial.pdf" rel="nofollow">http://www.dst.unive.it/rsr/BelVenTutorial.pdf</a>) shows the use of t statistics on pg. 19-21</p>
  
  <p>Two questions:</p>
  
  <ol>
  <li><p>Can someone explain to me conceptually why statsmodels uses a z-test rather than a t-test?</p></li>
  <li><p>All terms and interactions are highly significant in the results (|z| > 4).  In most cases, each item has 40 or more observations.  There are some items that have 21-25 observations.  Is there reason to believe that RLM is not effective in a small sample environment?  The line it produces must be the best fit line after reweighting outliers, but is the z-test effective for samples of this size (ie, is there a reason to believe the confidence interval produced by smf.rlm() does not produce 95% probability coverage?  I know for t-tests this potentially can be an issue...)?</p></li>
  </ol>
  
  <p>Thanks!</p>