#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 ( [ 3.067066 , 13.27205 , 0.1905093 , 27.60181 ] ) #NEWLINE# Df = np . array ( [ 1 , 2 , 2 , 51 ] ) #NEWLINE# F_value = np . array ( [ 5.667033 , 12.26141 , 0.1760025 , np . nan ] ) #NEWLINE# PrF = np . array ( [ 0.02106078 , 4.487909e-05 , 0.8391231 , np . nan ] ) #NEWLINE# results = anova_lm ( anova_ii , typ = 'II' ) #NEWLINE# np . testing . assert_equal ( self [ 'df' ] . values , Df ) #NEWLINE# np . testing . assert_almost_equal ( results [ 'sum_sq' ] . values , Sum_Sq , 4 ) #NEWLINE# np . testing . assert_almost_equal ( results [ 'F' ] . values , F_value , 4 ) #NEWLINE# np . testing . assert_almost_equal ( results [ 'PR(>F)' ] . values , PrF )