Learn R Programming

GPTCM (version 1.1.3)

plotBrier: Plot curves of time-dependent Brier score

Description

Predict time-dependent Brier scores based on different survival models

Usage

plotBrier(
  dat,
  datMCMC,
  dat.new = NULL,
  time.star = NULL,
  xlab = "Time",
  ylab = "Brier score",
  PTCM = TRUE,
  ...
)

Value

A ggplot2::ggplot object. See ?ggplot2::ggplot for more details of the object.

Arguments

dat

input data as a list containing survival data sub-list survObj with two vectors (event and time), clinical variable matrix x0, cluster-specific covariates X, and proportions data matrix proportion

datMCMC

returned object from the main function GPTCM()

dat.new

input data for out-sample prediction, with the same format as dat

time.star

largest time for survival prediction

xlab

a title for the x axis

ylab

a title for the y axis

PTCM

logical value for adding survival prediction by the PTCM

...

other parameters

References

Zhao Z, Kızılaslan F, Wang S, Zucknick M (2025). Generalized promotion time cure model: A new modeling framework to identify cell-type-specific genes and improve survival prognosis. arXiv:2509.01001

Examples

Run this code

# simulate data
set.seed(123)
n <- 200 # subjects
p <- 10 # variable selection predictors
L <- 3 # cell types
dat <- simData(n, p, L)

# run a Bayesian GPTCM model: GPTCM-Ber2
fit <- GPTCM(dat, nIter = 5, burnin = 0)

# \donttest{
plotBrier(dat, datMCMC = fit, PTCM = FALSE)
# }

Run the code above in your browser using DataLab