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, optional

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

cprbool, optional

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

include_constantbool, optional

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.

axAxesSubplot, optional

An axes on which to draw the graph. If None, new figure and axes objects are created.

Returns:
Figure

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