Plot smooth function components of gSlc fits

Share:

Description

Smooth function components of generalized additive mixed model fits obtained via gSlc are plotted.

Usage

1
2
3
## S3 method for class 'gSlc'
plot(x,pages=0,responseScale = FALSE,xlab = NULL,ylab = NULL,main=NULL,
                    bty = NULL,...)

Arguments

x

gSlc object.

pages

The number of pages used to display the smooth function fits. The default value of pages is 0. Set to 0 to have the routine leave the graphic settings as they are.

responseScale

Boolean flag indicating whether or the smooth function fits are plotted on the same scale as the response variable. If responseScale is set to FALSE then the the smooth function fits are plotted on the link scale. The default value of responseScale is FALSE.

xlab

They are used as the x label for plots if supplied.

ylab

They are used as the y labels for plots if supplied.

main

They are used as the title for plots if supplied.

bty

A character string which determined the type of box which is drawn about plots. See par for reference.

...

Other graphic parameters.

Details

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.

Author(s)

Tung Pham tung.pham@epfl.ch and Matt Wand matt.wand@uts.edu.au.

References

Pham, T. and Wand, M.P. (2012).
Generalized additive mixed model analysis via gammSlice.
Submitted.

See Also

gSlc, summary.gSlc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
dat1 <- gSlcSim(eg=3, num.rep = 10, num.gps = 100, family = "binomial",
                random.factor = FALSE)
fit1 <- gSlc(y~s(x1),family = "binomial", data = dat1)
plot(fit1)
plot(fit1,responseScale=TRUE)

dat2 <- gSlcSim(eg=6,family = "poisson", random.factor = TRUE)
fit2 <- gSlc(y~x1 + x2 + s(x3) + s(x4), random = list(idnum=~1),
             family = "poisson", data = dat2)
plot(fit2,pages=2)

## End(Not run)