statsmodels.gam.generalized_additive_model.GLMGamResults.plot_partial

GLMGamResults.plot_partial(smooth_index, plot_se=True, cpr=False, include_constant=True, ax=None)[source]

plot the contribution of a smooth term to the linear prediction

Parameters:
smooth_indexint

index of the smooth term within list of smooth terms

plot_sebool

If plot_se is true, then the confidence interval for the linear prediction will be added to the plot.

cprbool

If cpr (component plus residual) is true, the a scatter plot of the partial working residuals will be added to the plot.

include_constantbool

If true, then the estimated intercept is added to the prediction and its standard errors. This avoids that the confidence interval has zero width at the imposed identification constraint, e.g. either at a reference point or at the mean.

axNone or matplotlib axis instance

If ax is not None, then the plot will be added to it.

Returns:
Figure

If ax is None, the created figure. Otherwise the Figure to which ax is connected.