report.iplot

report.iplot(models, alpha=0.05, figsize=None, yintercept=None, xintercept=None, rotate_xticks=0, title=None, coord_flip=True, keep=None, drop=None, exact_match=False, plot_backend='lets_plot')

Plot model coefficients for variables interacted via “i()” syntax, with confidence intervals.

Parameters

Name Type Description Default
models list or object A list of fitted models of type Feols or Fepois, or just a single model. required
figsize tuple or None The size of the figure. If None, the default size is used. None
alpha float The significance level for the confidence intervals. 0.05
yintercept int or None The value at which to draw a horizontal line on the plot. None
xintercept int or None The value at which to draw a vertical line on the plot. None
rotate_xticks float The angle in degrees to rotate the xticks labels. Default is 0 (no rotation). 0
title str The title of the plot. None
coord_flip bool Whether to flip the coordinates of the plot. Default is True. True
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 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
plot_backend str The plotting backend to use between “lets_plot” (default) and “matplotlib”. 'lets_plot'

Returns

Type Description
object A lets-plot figure.

Examples

import pyfixest as pf

df = pf.get_data()
fit1 = pf.feols("Y ~ i(f1)", data = df)
fit2 = pf.feols("Y ~ i(f1) + X2", data = df)
fit3 = pf.feols("Y ~ i(f1) + X2 | f2", data = df)

pf.iplot([fit1, fit2, fit3])