plot.vagam {vagam}R Documentation

Basic plots for a fitted generalized additive model (GAMs).

Description

Takes a fitted vagam object produced by the main vagam function and plots the component smooth functions that make it up, on the scale of the linear predictor.

Usage

## S3 method for class 'vagam'
plot(x, n = 100, alpha = 0.05, rug = TRUE, se = TRUE, 
xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, main = NULL, 
select = NULL, ...)

Arguments

x

An object of class "vagam".

n

Number of observations used in constructing predictions for plotting.

alpha

Level of significance for the pointwise confidence bands for predictions.

rug

If rug = TRUE, adds a rug representation (1-d plot) of the data to the plot.

se

If se = TRUE, adds lower and upper bounds of 95% pointwise confidence bands.

xlim

Range of plotting for x variable.

ylim

Range of plotting for y variable.

xlab

Label for x variable.

ylab

Label for y variable.

main

Title of plotting.

select

Select which observations to plot.

...

Other plotting arguments.

Details

Currently implements a basic plot for each of the fitted smoothers from a GAM fitted using the main vagam function. This is done by making use of the predict function to construct the fitted smooths. There is also the option of adding pointwise confidence bands based on fitted vagam object. Under the variational approximations framework, the smooths and confidence bands are constructed based on the variational approximation to the posterior distribution of the smoothing coefficients (which are treated as random effects with a normal prior under the mixed model framework). Please see Hui et al., (2018) for more information.

Value

The functions main purpose is its side effect of generating a set of plots.

Author(s)

NA

References

See Also

vagam for the main fitting function

Examples

## Please see examples in the help file for the vagam function.

[Package vagam version 1.1 Index]