gam.Dx: Draw diagnostic plots for a fitted gam model

Description Usage Arguments Examples

Description

Draw diagnostic plots for a fitted gam model

Usage

1
2
3
4
5
6
7
gam.Dx(
  b,
  type = c("deviance", "pearson", "response"),
  rep = 0,
  level = 0.9,
  select = NULL
)

Arguments

b

a fitted gam object as produced by gam().

type

type of residuals

rep

arguments passed to qq.gam()

level

arguments passed to qq.gam()

select

numeric choices of plots

Examples

1
2
3
4
5
6
7
8
require(mgcv)
data(pbc,package="survival")
pbc$status1 <- as.numeric(pbc$status==2)
pbc$stage <- factor(pbc$stage)
b = gam(time ~ trt +sex + s(sqrt(protime))+s(platelet)+ s(age)+s(bili)+s(albumin),
   weights=status1, family=cox.ph, data=pbc, method="REML")
gam.Dx(b)
gam.Dx(b,select=4)

cardiomoon/ggGam documentation built on May 2, 2020, 9:58 a.m.