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.
# S3 method for vagam
plot(x, n = 100, alpha = 0.05, rug = TRUE, se = TRUE,
xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, main = NULL,
select = NULL, ...)
An object of class "vagam".
Number of observations used in constructing predictions for plotting.
Level of significance for the pointwise confidence bands for predictions.
If rug = TRUE
, adds a rug representation (1-d plot) of the data to the plot.
If se = TRUE
, adds lower and upper bounds of 95% pointwise confidence bands.
Range of plotting for x variable.
Range of plotting for y variable.
Label for x variable.
Label for y variable.
Title of plotting.
Select which observations to plot.
Other plotting arguments.
The functions main purpose is its side effect of generating a set of plots.
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.
Hui, F. K. C., You, C., Shang, H. L., and Mueller, S. (2018). Semiparametric regression using variational approximations, Journal of the American Statistical Association, forthcoming.
vagam for the main fitting function
# NOT RUN {
## Please see examples in the help file for the vagam function.
# }
Run the code above in your browser using DataLab