#NEWLINE# def __init__( self ) : #NEWLINE# #INDENT# '\n        Tests Poisson family with canonical log link.\n\n        Test results were obtained by R.\n        ' #NEWLINE# from . results.results_glm import Cpunish #NEWLINE# from statsmodels.datasets.cpunish import load #NEWLINE# self . data = load ( ) #NEWLINE# self . data . exog [ : , 3 ] = np . log ( self . data . exog [ : , 3 ] ) #NEWLINE# self . data . exog = add_constant ( self . data . exog , prepend = False ) #NEWLINE# self . res1 = GLM ( self . data . endog , self . data . exog , family = sm . families . Poisson ( ) ) . fit ( ) #NEWLINE# self . res2 = Cpunish ( ) #NEWLINE# modd = discrete . Poisson ( self . data . endog , self . data . exog ) #NEWLINE# self . resd = modd . fit ( start_params = ( self . res1 . params * 0.9 ) , disp = False )