report.etable
report.etable(models, type='md', signif_code=[0.001, 0.01, 0.05], coef_fmt='b (se)', custom_stats=None, keep=None, drop=None, exact_match=False, **kwargs)
Create an esttab-like table from a list of models.
Parameters
Name | Type | Description | Default |
---|---|---|---|
models |
list | A list of models of type Feols, Feiv, Fepois. | required |
type |
str | Type of output. Either “df” for pandas DataFrame, “md” for markdown, or “tex” for LaTeX table. Default is “md”. | 'md' |
signif_code |
list | Significance levels for the stars. Default is [0.001, 0.01, 0.05]. If None, no stars are printed. | [0.001, 0.01, 0.05] |
coef_fmt |
str | The format of the coefficient (b), standard error (se), t-stats (t), and p-value (p). Default is "b (se)" . Spaces , parentheses () , brackets [] , newlines \n are supported. Newline is not support for LaTeX output. |
'b (se)' |
custom_stats |
Optional[dict] | A dictionary of custom statistics. “b”, “se”, “t”, or “p” are reserved. | 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 |
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 |
Returns
Type | Description |
---|---|
pandas.DataFrame | A DataFrame with the coefficients and standard errors of the models. |