drawFUData: Draw follow-up plot for laboratory data

Description Usage Arguments Examples

View source: R/tdpois.R

Description

Draw follow-up plot for laboratory data

Usage

1
2
3
4
5
6
7
drawFUData(
  model,
  data,
  which = c("protime", "platelet", "bili", "albumin", "ast"),
  point = TRUE,
  line = TRUE
)

Arguments

model

An object of class gam

data

A data.frame

which

A character vector Names of columns to drae

point

logical Whether or not draw point

line

logical Whether or not draw line

Examples

1
2
3
4
5
6
7
8
9
library(survival)
library(mgcv)
pbcseq$status1 <- as.numeric(pbcseq$status==2) ## deaths
pb <- tdpois(pbcseq) ## conversion
pb$tf <- factor(pb$futime) ## add factor for event time
b <- bam(z ~ tf - 1 + trt + s(sqrt(protime)) + s(platelet) + s(age) + s(bili) +
s(albumin) + s(sqrt(ast)),family=poisson,data=pb,discrete=TRUE,nthreads=2)
data=pbcseq[pbcseq$id==25,]
drawFUData(b,data,which=c("protime","platelet","bili","albumin","ast"))

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