Learn R Programming

GPTCM (version 1.1.3)

plotMCMC: MCMC trace-plots

Description

Trace-plots of regression coefficients over MCMC iterations

Usage

plotMCMC(dat, datMCMC, estimator = "xi")

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()

estimator

print estimators, one of c("beta", "zeta", "gamma", "eta")

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)

plotMCMC(dat, datMCMC = fit, estimator = "xi")

Run the code above in your browser using DataLab