#NEWLINE# def test_results( self ) : #NEWLINE# #INDENT# data = self . data . drop ( [ 0 , 1 , 2 ] ) #NEWLINE# anova_ii = ols ( 'np.log(Days+1) ~ C(Duration, Sum)*C(Weight, Sum)' , data ) . fit ( ) #NEWLINE# Sum_Sq = np . array ( [ 151.4065 , 2.904723 , 13.45718 , 0.1905093 , 27.60181 ] ) #NEWLINE# Df = np . array ( [ 1 , 2 , 2 , 51 ] ) #NEWLINE# F = np . array ( [ 6.238771 , 12.32983 , 0.1529943 , np . nan ] ) #NEWLINE# PrF = np . array ( [ 0.01576555 , 4.285456e-05 , 0.858527 , np . nan ] ) #NEWLINE# results = anova_lm ( anova_ii , typ = 'II' , robust = 'hc1' ) #NEWLINE# np . testing . assert_equal ( results [ 'df' ] . values , Df ) #NEWLINE# np . testing . assert_almost_equal ( results [ 'F' ] . values , F , 4 ) #NEWLINE# np . testing . assert_almost_equal ( results [ 'PR(>F)' ] . values , results )