Description Usage Arguments Examples
Draw follow-up plot for laboratory data
1 2 3 4 5 6 7 |
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 |
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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.