def test_contrast3(self):
    X = self.formula.design()
    P = np.dot(X, L.pinv(X))
    dummy = formula.Term('noise')
    resid = (np.identity(40) - P)
    self.namespace['noise'] = np.transpose(np.dot(resid, R.standard_normal((40, 5))))
    terms = (dummy + self.terms[2])
    terms.namespace = self.formula.namespace
    c = contrast.Contrast(terms, self.formula)
    assert_equal(c.matrix.shape, (10,))
def test_contrast3(self):
    X = self.formula.design()
    P = np.dot(X, L.pinv(X))
    dummy = formula.Term('noise')
    resid = (np.identity(40) - P)
    self.namespace['noise'] = np.transpose(np.dot(resid, R.standard_normal((40, 5))))
    terms = (dummy + self.terms[2])
    terms.namespace = self.formula.namespace
    c = contrast.Contrast(terms, self.formula)
    assert_equal(c.matrix.shape, (10,))