#NEWLINE# def summary_params( results , yname = None , xname = None , alpha = 0.05 , use_t = True , skip_header = False , title = None ) : #NEWLINE# #INDENT# 'create a summary table for the parameters\n\n    Parameters\n    ----------\n    res : results instance\n        some required information is directly taken from the result\n        instance\n    yname : string or None\n        optional name for the endogenous variable, default is "y"\n    xname : list of strings or None\n        optional names for the exogenous variables, default is "var_xx"\n    alpha : float\n        significance level for the confidence intervals\n    use_t : bool\n        indicator whether the p-values are based on the Student-t\n        distribution (if True) or on the normal distribution (if False)\n    skip_headers : bool\n        If false (default), then the header row is added. If true, then no\n        header row is added.\n\n    Returns\n    -------\n    params_table : SimpleTable instance\n    ' #NEWLINE# if isinstance ( results , tuple ) : #NEWLINE# #INDENT# ( results , params , std_err , tvalues , pvalues , conf_int ) = results #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# params = results . params #NEWLINE# std_err = results . bse #NEWLINE# tvalues = results . tvalues #NEWLINE# pvalues = results . pvalues #NEWLINE# conf_int = results . conf_int ( alpha ) #NEWLINE# #UNINDENT# if use_t : #NEWLINE# #INDENT# param_header = [ 'coef' , 'std err' , 't' , 'P>|t|' , ( '[' + str ( ( alpha / 2 ) ) ) , ( str ( ( 1 - ( alpha / 2 ) ) ) + ']' ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# param_header = [ 'coef' , 'std err' , 'z' , 'P>|z|' , ( '[' + str ( ( alpha / 2 ) ) ) , ( str ( ( 1 - ( alpha / 2 ) ) ) + ']' ) ] #NEWLINE# #UNINDENT# if skip_header : #NEWLINE# #INDENT# param_header = None #NEWLINE# #UNINDENT# ( _ , xname ) = _getnames ( results , yname = yname , xname = xname ) #NEWLINE# params_stubs = xname #NEWLINE# exog_idx = lrange ( len ( xname ) ) #NEWLINE# params_data = lzip ( [ forg ( params [ i ] , prec = 4 ) for i in exog_idx ] , [ forg ( std_err [ i ] ) for i in exog_idx ] , [ forg ( tvalues [ i ] ) for i in exog_idx ] , [ ( '%#6.3f' % pvalues [ i ] ) for i in exog_idx ] , [ forg ( conf_int [ ( i , 0 ) ] ) for i in exog_idx ] , [ forg ( conf_int [ ( i , 1 ) ] ) for i in exog_idx ] ) #NEWLINE# parameter_table = SimpleTable ( params_data , param_header , params_stubs , title = title , txt_fmt = fmt_params ) #NEWLINE# return i