2
Test functions for models.rlm
5
import numpy.random as R
6
from numpy.testing import NumpyTest, NumpyTestCase
8
import scipy.sandbox.models.rlm as models
12
class test_Regression(NumpyTestCase):
14
def test_Robust(self):
17
model = models(design=X)
18
results = model.fit(Y)
19
self.assertEquals(results.df_resid, 30)
21
def test_Robustdegenerate(self):
23
X[:,0] = X[:,1] + X[:,2]
25
model = models(design=X)
26
results = model.fit(Y)
27
self.assertEquals(results.df_resid, 31)
29
if __name__ == "__main__":