regtools.summarize package

regtools.summarize.produce_summary(reg_list, stderr=False, t_stats=False, float_format='%0.1f', regressor_order=(), suppress_other_regressors=False, model_names=None)[source]

Produce a summary from a list of regression results

Parameters
  • reg_list – list of statsmodels regression results

  • stderr (bool) – set to True to keep rows for standard errors below coefficient estimates

  • t_stats (bool) – set to True to keep rows for standard errors below coefficient estimates and convert them to t-stats

  • float_format (str) – format string for how to format results in summary

  • regressor_order (Sequence[str]) – sequence of column names to put first in the regression results

  • suppress_other_regressors (bool) – True for when using regressor_order to suppress coefficients that are not in regressor_order into “Controls: Yes”. False to keep coefficients

  • model_names (Optional[Sequence[str]]) – If a collection is passed, will be used as column names in summary table.

Returns

a regression summary

Return type

Submodules

regtools.summarize.split module

regtools.summarize.split.get_var_df_and_non_var_df(df, split_rows=('N', 'R2', 'Adj-R2'))[source]

Splits rows containing N, R2, Adj-R2 into separate dataframe

regtools.summarize.tstat module

regtools.summarize.tstat.convert_to_stderr_format(value, num_decimals=2)[source]
Return type

str

regtools.summarize.tstat.replace_stderr_with_t_stat_in_summary_df(df, split_rows, reg_list)[source]
Return type

DataFrame

regtools.summarize.tstat.replace_stderr_with_t_stat_in_var_df(df, reg_list)[source]
Return type

DataFrame

regtools.summarize.yesno module

regtools.summarize.yesno.col_boolean_dict_from_list_of_lists_of_columns(column_list_list)[source]
transforms [

[‘a’, ‘b’], [‘a’], [‘b’], None, False, [], [‘a’,’b’]

]

into {

‘a’: [True, True, False, False, False, False, True], ‘b’: [True, False, True, False, False, False, True]

} Returns:

Return type

Dict[str, List[bool]]