Learn R Programming

GPTCM (version 1.1.3)

simData: Simulate data

Description

Simulate survival data based on a GPTCM or Cox model

Usage

simData(
  n = 200,
  p = 10,
  L = 3,
  Sigma = NULL,
  kappas = 2,
  proportion.model = "dirichlet",
  model = "GPTCM"
)

Value

An object of a list with 12 components

  • "survObj" - a list including events and times

  • "accepted" - a vector with acceptance rates to generate each time-to-event data point by Metropolis-Hastings algorithm.

  • "proportion.model" - value to indicate the model type for simulating proportions data.

  • "proportion" - a matrix with simulated proportions data.

  • "kappas" - value of the Weibull's shape parameter.

  • "x0" - a matrix with the data of clinical variables

  • "X" - an array with cluster-specific covariates

  • "xi" - effects of clinical variables

  • "beta0" - intercepts related to cluster-specific-survival.

  • "betas" - effects related to cluster-specific-survival.

  • "zetas" - effects related to cluster-specific-proportions.

  • "mrfG" - a graph corresponding to the precision matrix of cluster-specific covariates

  • "mrfG2" - a graph corresponding to every second edge in "mrfG"

Arguments

n

number of subjects

p

number of covariates in each cluster

L

number of clusters

Sigma

NULL (for a default covariance matrix) or "independent" (i.e. Sigma=diag(p*L)) or a self-defined matrix

kappas

value of the Weibull's shape parameter

proportion.model

One of c("alr", "cloglog", "log", "dirichlet")

model

one of c("GPTCM", "Cox")

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

Run the code above in your browser using DataLab