'Returns a summary table for marginal effects
Parameters
alpha : float
Number between 0 and 1. The confidence intervals have the
probability 1-alpha.
Returns
Summary : SummaryTable
A SummaryTable instance'

def summary(self, alpha=0.05):

    _check_at_is_all(self.margeff_options)
    results = self.results
    model = results.model
    title = (model.__class__.__name__ + '    Marginal    Effects')
    method = self.margeff_options['method']
    top_left = [('Dep.    Variable:', [model.endog_names]), ('Method:', [method]), ('At:', [self.margeff_options['at']])]
    from statsmodels.iolib.summary import Summary, summary_params, table_extend
    exog_names = model.exog_names[:]
    smry = Summary()
    (_, const_idx) = _get_const_index(model.exog)
    if (const_idx is not None):
        exog_names.pop(const_idx[0])
    J = int(getattr(model, 'J', 1))
    if (J > 1):
        (yname, yname_list) = results._get_endog_name(model.endog_names, None, all=True)
    else:
        yname = model.endog_names
        yname_list = [yname]
    smry.add_table_2cols(self, gleft=top_left, gright=[], yname=yname, xname=exog_names, title=title)
    table = []
    conf_int = self.conf_int(alpha)
    margeff = self.margeff
    margeff_se = self.margeff_se
    tvalues = self.tvalues
    pvalues = self.pvalues
    if (J > 1):
        for eq in range(J):
            restup = (results, margeff[:, eq], margeff_se[:, eq], tvalues[:, eq], pvalues[:, eq], conf_int[:, :, eq])
            tble = summary_params(restup, yname=yname_list[eq], xname=exog_names, alpha=alpha, use_t=False, skip_header=True)
            tble.title = yname_list[eq]
            header = ['', _transform_names[method], 'std    err', 'z', 'P>|z|', ('[' + str((alpha / 2))), (str((1 - (alpha / 2))) + ']')]
            tble.insert_header_row(0, header)
            table.append(tble)
        table = table_extend(table, keep_headers=True)
    else:
        restup = (results, margeff, margeff_se, tvalues, pvalues, conf_int)
        table = summary_params(restup, yname=yname, xname=exog_names, alpha=alpha, use_t=False, skip_header=True)
        header = ['', _transform_names[method], 'std    err', 'z', 'P>|z|', ('[' + str((alpha / 2))), (str((1 - (alpha / 2))) + ']')]
        table.insert_header_row(0, header)
    smry.tables.append(table)
    return smry
