Learn R Programming

spikeSlabGAM (version 1.0-0)

plot.spikeSlabGAM: Generates graphical summaries of a fitted model...

Description

Generates graphical summaries of a fitted model

Usage

## S3 method for class 'spikeSlabGAM':
plot(x, labels = NULL, cumulative = TRUE, commonEtaScale =
                 FALSE, aggregate = mean, quantiles = c(0.1, 0.9),
                 gridlength = 20, base_size = 12, ggElems = list(),
                 rows = NULL, cols = NULL, widths = NULL, heights =
                 NULL, align = NULL, maxPlotsPerPage = 6, ...)

Arguments

x
a fitted spikeSlabGAM model
labels
a character vector of names of model terms to be plotted
cumulative
Defaults to TRUE, in which case all lower order terms that are involved in an interaction are cumulated and then plotted (e.g, if a model contains 2 smooth effects and their interaction, ONLY the sum of the marginal smooth and linear terms and all thei
commonEtaScale
use the same limits for all vertical axes of the different panels? Defaults to FALSE. Can be useful to compare effect sizes more effectively between panels, but tends to mess up the scales.
aggregate
(function) which summary statistic to use for the posterior of the model terms. Defaults to the mean.
quantiles
which quantiles to use for the borders of credible regions. Defaults to 10% and 90% percentiles. Set to NULL to omit plotting credible regions.
gridlength
length of the (univariate) grids for the covariates on which to evaluate the posterior. Defaults to 40.
base_size
default base font size for plot (see e.g. theme_gray)
ggElems
a list of plot elements to give to ggplot. Use this to supply custom themes or colors, fortify the plot(s) with partial residuals etc. Defaults to an empty list. Unless specified differently here, the default ggplot-theme is changed to
rows
a list controlling the positioning of the various plots on the device. See arrange.ggplots
cols
a list controlling the positioning of the various plots on the device. See arrange.ggplots
widths
a list controlling the positioning of the various plots on the device. See arrange.ggplots
heights
a list controlling the positioning of the various plots on the device. See arrange.ggplots
align
a vector controlling the positioning of the various plots on the device. See arrange.ggplots. Defaults to no alignment.
maxPlotsPerPage
maximum number of plots rendered on a single page/device. Defaults to 9.
...
arguments passed from or to other methods (not used)

Value

  • a list of ggplot-objects (invisible)

Details

This function plots the estimated linear predictors of the terms in a model on a grid of values. By default displays all 3-way, 2-way interactions and main effects present in the model.

See Also

plotTerm for more details on the specific plots

Examples

Run this code
#see ?spikeSlabGAM}

Run the code above in your browser using DataLab