- object
a fitted GAM, the result of a call to mgcv::gam().
- data
a optional data frame that may or may not be used? FIXME!
- select
character, logical, or numeric; which smooths to plot. If
NULL, the default, then all model smooths are drawn. Numeric select
indexes the smooths in the order they are specified in the formula and
stored in object. Character select matches the labels for smooths
as shown for example in the output from summary(object). Logical
select operates as per numeric select in the order that smooths are
stored.
- parametric
logical; plot parametric terms also? Note that select is
used for selecting which smooths to plot. The terms argument is used to
select which parametric effects are plotted. The default, as with
mgcv::plot.gam(), is to not draw parametyric effects.
- terms
character; which model parametric terms should be drawn? The
Default of NULL will plot all parametric terms that can be drawn.
- residuals
logical; should partial residuals for a smooth be drawn?
Ignored for anything but a simple univariate smooth.
- scales
character; should all univariate smooths be plotted with the
same y-axis scale? If scales = "free", the default, each univariate
smooth has its own y-axis scale. If scales = "fixed", a common y axis
scale is used for all univariate smooths.
Currently does not affect the y-axis scale of plots of the parametric
terms.
- ci_level
numeric between 0 and 1; the coverage of credible interval.
- n
numeric; the number of points over the range of the covariate at
which to evaluate the smooth.
- n_3d
numeric; the number of new observations to generate for the third
dimension of a 3D smooth.
- n_4d
numeric; the number of new observations to generate for the
dimensions higher than 2 (!) of a kD smooth (k >= 4). For example, if
the smooth is a 4D smooth, each of dimensions 3 and 4 will get n_4d
new observations.
- unconditional
logical; should confidence intervals include the
uncertainty due to smoothness selection? If TRUE, the corrected Bayesian
covariance matrix will be used.
- overall_uncertainty
logical; should the uncertainty in the model
constant term be included in the standard error of the evaluate values of
the smooth?
- constant
numeric; a constant to add to the estimated values of the
smooth. constant, if supplied, will be added to the estimated value
before the confidence band is computed.
- fun
function; a function that will be applied to the estimated values
and confidence interval before plotting. Can be a function or the name of a
function. Function fun will be applied after adding any constant, if
provided.
- dist
numeric; if greater than 0, this is used to determine when
a location is too far from data to be plotted when plotting 2-D smooths.
The data are scaled into the unit square before deciding what to exclude,
and dist is a distance within the unit square. See
mgcv::exclude.too.far() for further details.
- rug
logical; draw a rug plot at the botom of each plot for 1-D
smooths or plot locations of data for higher dimensions.
- contour
logical; should contours be draw on the plot using
ggplot2::geom_contour().
- ci_alpha
numeric; alpha transparency for confidence or simultaneous
interval.
- ci_col
colour specification for the confidence/credible intervals
band. Affects the fill of the interval.
- smooth_col
colour specification for the smooth line.
- resid_col
colour specification for the partial residuals.
- contour_col
colour specification for contour lines.
- n_contour
numeric; the number of contour bins. Will result in
n_contour - 1 contour lines being drawn. See ggplot2::geom_contour().
- partial_match
logical; should smooths be selected by partial matches
with select? If TRUE, select can only be a single string to match
against.
- discrete_colour, discrete_fill, continuous_colour, continuous_fill
suitable scales for the types of data.
- position
Position adjustment, either as a string, or the result of a
call to a position adjustment function.
- angle
numeric; the angle at which the x axis tick labels are to be
drawn passed to the angle argument of ggplot2::guide_axis().
- ncol, nrow
numeric; the numbers of rows and columns over which to
spread the plots
- guides
character; one of "keep" (the default), "collect", or
"auto". Passed to patchwork::plot_layout()
- widths, heights
The relative widths and heights of each column and
row in the grid. Will get repeated to match the dimensions of the grid. If
there is more than 1 plot and widths = NULL, the value of widths will
be set internally to widths = 1 to accomodate plots of smooths that
use a fixed aspect ratio.
- projection
character; projection to use, see ggplot2::coord_map()
for details.
- orientation
an optional vector c(latitude, longitude, rotation)
which describes where the "North Pole" should be when computing the
projection. The third value is a clockwise rotation (in degrees), which
defaults to the midrange of the longitude coordinates in the data. The
default values for orientation therefore are
`c(20, 0, mean(range(longitude))))`` if this is not specified by the user.
See links in ggplot2::coord_map() for more information.
- wrap
logical; wrap plots as a patchwork?
- ...
additional arguments passed to patchwork::wrap_plots().