Learn R Programming

GPTCM (version 1.1.3)

predict.GPTCM: Prediction of survival probability

Description

Compute predicted survival probability for a GPTCM

Usage

# S3 method for GPTCM
predict(object, dat, newdata = NULL, type = "survival", times = NULL, ...)

Value

A matrix object

Arguments

object

the results of a GPTCM fit

dat

the dataset used in GPTCM()

newdata

optional new data at which to do predictions. If missing, the prediction will be based on the training data

type

the type of predicted value. Currently it is only valid with 'survival'

times

evaluation time points for survival prediction. Default NULL for predicting all time points in the newdata set

...

for future methods

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 = 10, burnin = 0)

pred.survival <- predict(fit, dat, newdata = dat, times = c(1, 3, 5))

Run the code above in your browser using DataLab