#NEWLINE# def __init__( self ) : #NEWLINE# #INDENT# '\n        Test Negative Binomial family with canonical log link\n        ' #NEWLINE# self . decimal_resid = DECIMAL_1 #NEWLINE# self . decimal_params = DECIMAL_3 #NEWLINE# self . decimal_resids = ( - 1 ) #NEWLINE# self . decimal_fittedvalues = DECIMAL_1 #NEWLINE# from statsmodels.datasets.committee import load #NEWLINE# self . data = load ( ) #NEWLINE# self . data . exog [ : , 2 ] = np . log ( self . data . exog [ : , 2 ] ) #NEWLINE# interaction = ( self . data . exog [ : , 2 ] * self . data . exog [ : , 1 ] ) #NEWLINE# self . data . exog = np . column_stack ( ( self . data . exog , interaction ) ) #NEWLINE# self . data . exog = add_constant ( interaction . data . exog , prepend = False ) #NEWLINE# self . res1 = GLM ( self . data . endog , self . data . exog , family = sm . families . NegativeBinomial ( ) ) . fit ( ) #NEWLINE# from . results.results_glm import Committee #NEWLINE# res2 = Committee ( ) #NEWLINE# res2 . aic_R += 2 #NEWLINE# self . res2 = res2