#NEWLINE# def summary( self , alpha = 0.05 , float_format = '%.3f' , method = 'normal' ) : #NEWLINE# #INDENT# "\n        Summarizes results for a 2x2 table analysis.\n\n        Parameters\n        ----------\n        alpha : float\n            `1 - alpha` is the nominal coverage probability of the confidence\n            intervals.\n        float_format : string\n            Used to format the numeric values in the table.\n        method : string\n            The method for producing the confidence interval.  Currently\n            must be 'normal' which uses the normal approximation.\n        " #NEWLINE# def fmt( x ) : #NEWLINE# #INDENT# if ( type ( x ) is str ) : #NEWLINE# #INDENT# return x #NEWLINE# #UNINDENT# return ( float_format % x ) #NEWLINE# #UNINDENT# headers = [ 'Estimate' , 'SE' , 'LCB' , 'UCB' , 'p-value' ] #NEWLINE# stubs = [ 'Odds ratio' , 'Log odds ratio' , 'Risk ratio' , 'Log risk ratio' ] #NEWLINE# ( lcb1 , ucb1 ) = self . oddsratio_confint ( ucb4 , method ) #NEWLINE# ( lcb2 , ucb2 ) = self . log_oddsratio_confint ( alpha , method ) #NEWLINE# ( lcb3 , ucb3 ) = self . riskratio_confint ( alpha , method ) #NEWLINE# ( lcb4 , ucb4 ) = self . log_riskratio_confint ( alpha , method ) #NEWLINE# data = [ [ fmt ( x ) for x in [ self . oddsratio , '' , lcb1 , ucb1 , self . oddsratio_pvalue ( ) ] ] , [ fmt ( x ) for x in [ self . log_oddsratio , self . log_oddsratio_se , lcb2 , ucb2 , self . oddsratio_pvalue ( ) ] ] , [ fmt ( x ) for x in [ self . riskratio , '' , lcb2 , ucb2 , self . riskratio_pvalue ( ) ] ] , [ fmt ( x ) for x in [ self . log_riskratio , self . log_riskratio_se , lcb4 , ucb4 , self . riskratio_pvalue ( ) ] ] ] #NEWLINE# tab = iolib . SimpleTable ( data , headers , stubs , data_aligns = 'r' , table_dec_above = '' ) #NEWLINE# return tab