#NEWLINE# def summary_params_2d( result , extras = None , endog_names = None , exog_names = None , title = None ) : #NEWLINE# #INDENT# 'create summary table of regression parameters with several equations\n\n    This allows interleaving of parameters with bse and/or tvalues\n\n    Parameters\n    ----------\n    result : result instance\n        the result instance with params and attributes in extras\n    extras : list of strings\n        additional attributes to add below a parameter row, e.g. bse or tvalues\n    endog_names : None or list of strings\n        names for rows of the parameter array (multivariate endog)\n    exog_names : None or list of strings\n        names for columns of the parameter array (exog)\n    alpha : float\n        level for confidence intervals, default 0.95\n    title : None or string\n\n    Returns\n    -------\n    tables : list of SimpleTable\n        this contains a list of all seperate Subtables\n    table_all : SimpleTable\n        the merged table with results concatenated for each row of the parameter\n        array\n\n    ' #NEWLINE# if ( endog_names is None ) : #NEWLINE# #INDENT# endog_names = [ ( 'endog_%d' % i ) for i in np . unique ( result . model . endog ) [ 1 : ] ] #NEWLINE# #UNINDENT# if ( exog_names is None ) : #NEWLINE# #INDENT# exog_names = [ ( 'var%d' % i ) for i in range ( len ( result . params ) ) ] #NEWLINE# #UNINDENT# res_params = [ [ forg ( item , prec = 4 ) for item in row ] for row in result . params ] #NEWLINE# if extras : #NEWLINE# #INDENT# extras_list = [ [ [ ( '%10s' % ( ( '(' + forg ( v , prec = 3 ) . strip ( ) ) + ')' ) ) for v in col ] for col in getattr ( result , what ) ] for what in extras ] #NEWLINE# data = lzip ( res_params , * extras_list ) #NEWLINE# data = [ i for j in data for i in j ] #NEWLINE# stubs = lzip ( endog_names , * ( [ ( [ '' ] * len ( endog_names ) ) ] * len ( extras ) ) ) #NEWLINE# stubs = [ i for j in stubs for i in j ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# data = res_params #NEWLINE# stubs = endog_names #NEWLINE# #UNINDENT# import copy #NEWLINE# txt_fmt = copy . deepcopy ( fmt_params ) #NEWLINE# txt_fmt . update ( dict ( data_fmts = ( [ '%s' ] * result . params . shape [ 1 ] ) ) ) #NEWLINE# return SimpleTable ( data , headers = exog_names , stubs = stubs , title = title , txt_fmt = txt_fmt )