models |
A supported model object (Feols, Fepois, Feiv, FixestMulti) or a list of |
Feols, Fepois & Feiv models. The models to be summarized in the table. |
required |
type |
str |
Type of output. Either “df” for pandas DataFrame, “md” for markdown, “gt” for great_tables, or “tex” for LaTeX table. Default is “gt”. |
'gt' |
signif_code |
list |
Significance levels for the stars. Default is None, which sets [0.001, 0.01, 0.05]. If None, no stars are printed. |
None |
coef_fmt |
str |
The format of the coefficient (b), standard error (se), t-stats (t), and p-value (p). Default is "b \n (se)" . Spaces , parentheses () , brackets [] , newlines \n are supported. |
'b \n (se)' |
custom_stats |
Optional[dict] |
A dictionary of custom statistics that can be used in the coef_fmt string to be displayed in the coefficuent cells analogously to “b”, “se” etc. The keys are the names of the custom statistics, and the values are lists of lists, where each inner list contains the custom statistic values for all coefficients each model. Note that “b”, “se”, “t”, or “p” are reserved and cannot be used as keys. |
None |
custom_model_stats |
Optional[dict] |
A dictionary of custom model statistics or model information displayed in a new line in the bottom panel of the table. The keys are the names of the statistics (i.e. entry in the first column) and the values are a lists of the same length as the number of models. Default is None. |
None |
keep |
Optional[Union[list, str]] |
The pattern for retaining coefficient names. You can pass a string (one pattern) or a list (multiple patterns). Default is keeping all coefficients. You should use regular expressions to select coefficients. “age”, # would keep all coefficients containing age r”^tr”, # would keep all coefficients starting with tr r”\d$“, # would keep all coefficients ending with number Output will be in the order of the patterns. |
None |
drop |
Optional[Union[list, str]] |
The pattern for excluding coefficient names. You can pass a string (one pattern) or a list (multiple patterns). Syntax is the same as for keep . Default is keeping all coefficients. Parameter keep and drop can be used simultaneously. |
None |
exact_match |
Optional[bool] |
Whether to use exact match for keep and drop . Default is False. If True, the pattern will be matched exactly to the coefficient name instead of using regular expressions. |
False |
labels |
Optional[dict] |
A dictionary to relabel the variables. The keys in this dictionary are the original variable names, which correspond to the names stored in the _coefnames attribute of the model. The values in the dictionary are the new names you want to assign to these variables. Note that interaction terms will also be relabeled using the labels of the individual variables. The command is applied after the keep and drop commands. |
None |
cat_template |
Optional[str] |
Template to relabel categorical variables. None by default, which applies no relabeling. Other options include combinations of “{variable}” and “{value}”, e.g. “{variable}::{value}” to mimic fixest encoding. But “{variable}–{value}” or “{variable}{value}” or just “{value}” are also possible. |
None |
show_fe |
Optional[bool] |
Whether to show the rows with fixed effects markers. Default is True. |
True |
show_se_type |
Optional[bool] |
Whether to show the rows with standard error type. Default is True. |
True |
felabels |
Optional[dict] |
A dictionary to relabel the fixed effects. Only needed if you want to relabel the FE lines with a different label than the one specied for the respective variable in the labels dictionary. The command is applied after the keep and drop commands. |
None |
digits |
|
The number of digits to round to. |
required |
thousands_sep |
|
The thousands separator. Default is False. |
required |
scientific_notation |
|
Whether to use scientific notation. Default is True. |
required |
scientific_notation_threshold |
|
The threshold for using scientific notation. Default is 10_000. |
required |
notes |
str |
Custom table notes. Default shows the significance levels and the format of the coefficient cell. |
'' |
model_heads |
Optional[list] |
Add custom headlines to models when output as df or latex. Length of list must correspond to number of models. Default is None. |
None |
head_order |
Optional[str] |
String to determine the display of the table header when output as df or latex. Allowed values are “dh”, “hd”, “d”, “h”, or ““. When head_order is”dh”, the dependent variable is displayed first, followed by the custom model_heads (provided the user has specified them). With “hd” it is the other way around. When head_order is “d”, only the dependent variable and model numbers are displayed and with “” only the model numbers. Default is “dh”. |
'dh' |
file_name |
Optional[str] |
The name/path of the file to save the LaTeX table to. Default is None. |
None |