'Summarizes results for a 2x2 table analysis.
Parameters
alpha : float
`1 - alpha` is the nominal coverage probability of the confidence
intervals.
float_format : string
Used to format the numeric values in the table.
method : string
The method for producing the confidence interval.  Currently
must be \'normal\' which uses the normal approximation.'

def summary(self, alpha=0.05, float_format='%.3f', method='normal'):

    def fmt(x):
        if (type(x) is str):
            return x
        return (float_format % x)
    headers = ['Estimate', 'SE', 'LCB', 'UCB', 'p-value']
    stubs = ['Odds    ratio', 'Log    odds    ratio', 'Risk    ratio', 'Log    risk    ratio']
    (lcb1, ucb1) = self.oddsratio_confint(alpha, method)
    (lcb2, ucb2) = self.log_oddsratio_confint(alpha, method)
    (lcb3, ucb3) = self.riskratio_confint(alpha, method)
    (lcb4, ucb4) = self.log_riskratio_confint(alpha, method)
    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, '', lcb3, ucb3, self.riskratio_pvalue()]], [fmt(x) for x in [self.log_riskratio, self.log_riskratio_se, lcb4, ucb4, self.riskratio_pvalue()]]]
    tab = iolib.SimpleTable(data, headers, stubs, data_aligns='r', table_dec_above='')
    return tab
