GLMResults.plot_added_variable(focus_exog, resid_type=None, use_glm_weights=True, fit_kwargs=None, ax=None)[source]

Create an added variable plot for a fitted regression model.

focus_exogint or str

The column index of exog, or a variable name, indicating the variable whose role in the regression is to be assessed.


The type of residuals to use for the dependent variable. If None, uses resid_deviance for GLM/GEE and resid otherwise.


Only used if the model is a GLM or GEE. If True, the residuals for the focus predictor are computed using WLS, with the weights obtained from the IRLS calculations for fitting the GLM. If False, unweighted regression is used.

fit_kwargsdict, optional

Keyword arguments to be passed to fit when refitting the model.

ax: Axes

Matplotlib Axes instance


A matplotlib figure instance.

Last update: Dec 14, 2023