plot.gSlc {gammSlice} | R Documentation |
gSlc()
fitsSmooth function components of generalized additive mixed model fits obtained via gSlc
are plotted.
## S3 method for class 'gSlc' plot(x,gridSize=401,colour = TRUE,responseScale = FALSE, rug = TRUE,rugColour="dodgerblue",curveColour = "darkgreen", varBandPolygon = TRUE,varBandColour = "palegreen", xlab = NULL,ylab = NULL,bty = "l",cex.axis = 1, cex.lab = 1,...)
x |
|
gridSize |
Number of grid points used in graphical display of smooth function fits. |
colour |
Boolean flag: |
responseScale |
Boolean flag: |
rug |
Boolean flag: |
rugColour |
colour of the rug graphics. The default value is "dodgerblue". |
curveColour |
colour of the curves in the smooth function display. The default value is "darkgreen". |
varBandPolygon |
Boolean flag: |
varBandColour |
colour of the variability band polygon in the smooth function display. The default value is "palegreen". |
xlab |
optional argument: character string vector for horizontal labels for smooth function plots. |
ylab |
optional argument: character string vector for vertical labels for smooth function plots. |
bty |
character string which specifies the type of box which is drawn about plots. See |
cex.axis |
positive number specifying the factor by which numbers along the axes are expanded. |
cex.lab |
positive number specifying the factor by which characters in the axis labels are expanded. |
... |
place-holder for other graphic parameters. |
For each smooth function component of the generalized additive mixed model specified in the call to gSlc
the pointwise posterior mean is plotted along with a shaded polygon corresponding to pointwise 95% credible sets.
Tung Pham tungstats@gmail.com and Matt Wand matt.wand@uts.edu.au.
Pham, T. and Wand, M.P. (2018). Generalized additive mixed model analysis via gammSlice
. Australian and New Zealand Journal of Statistics, 60, 279-300.
library(gammSlice) set.seed(53902) n <- 400 ; x <- runif(n) fTrue <- function(x) return(cos(4*pi*x) + 2*x - 1) mu <- exp(fTrue(x)) ; y <- rpois(n,mu) fit <- gSlc(y~s(x),family="poisson",control=gSlc.control(nBurn=200,nKept=200,nThin=1,msgCode=0)) plot(fit) plot(fit,responseScale=TRUE,rug=FALSE) points(x,y,col="dodgerblue")