This function plots posterior empirical quantiles for a series-specific smooth term
| object | listobject returned frommvgam. Seemvgam()
 | 
| trend_effects | logical. If TRUEand atrend_formulawas used in model
fitting, terms from the trend (i.e. process) model will be plotted | 
| series | integerspecifying which series in the set is to be plotted
 | 
| smooth | either a characterorintegerspecifying which smooth term to be plotted | 
| residuals | logical. IfTRUEthen posterior quantiles of partial residuals are added
to plots of 1-D smooths as a series of ribbon rectangles.
Partial residuals for a smooth term are the median Dunn-Smyth residuals that would be obtained by dropping the term
concerned from the model, while leaving all other estimates fixed (i.e. the
estimates for the term plus the original median Dunn-Smyth residuals). Note that becausemvgamworks with
Dunn-Smyth residuals and not working residuals, which are used bymgcv, the magnitudes of
partial residuals will be different to what you would expect fromplot.gam. Interpretation
is similar though, as these partial residuals should be evenly scattered
around the smooth function if the function is well estimated
 | 
| n_resid_bins | integerspecifying the number of bins group the covariate into when plotting partial residuals.
Setting this argument too high can make for messy plots that are difficult to interpret, while setting it too
low will likely mask some potentially useful patterns in the partial residuals. Default is25
 | 
| realisations | logical. IfTRUE, posterior realisations are shown as a spaghetti plot,
making it easier to visualise the diversity of possible functions. IfFALSE, the default,
empirical quantiles of the posterior distribution are shown
 | 
| n_realisations | integerspecifying the number of posterior realisations to plot, ifrealisations = TRUE. Ignored otherwise
 | 
| derivatives | logical. IfTRUE, an additional plot will be returned to show the
estimated 1st derivative for the specified smooth (Note, this only works for univariate smooths)
 | 
| newdata | Optional dataframefor predicting the smooth, containing at least 'series'
in addition to any other variables included in the linear predictor of the original model'sformula.
Note that this currently is only supported for plotting univariate smooths | 
Smooth functions are shown as empirical quantiles (or spaghetti plots) of posterior partial expectations
across a sequence of 500 values between the variable's min and max,
while zeroing out effects of all other variables. At present, only univariate and bivariate smooth plots
are allowed, though note that bivariate smooths rely on default behaviour from
plot.gam. For more nuanced visualisation, supply
newdata just as you would when predicting from a gam model