Learn R Programming

GPTCM (version 1.1.3)

getEstimator: Extract the posterior estimate of parameters

Description

Extract the posterior estimate of the parameters of a GPTCM class object.

Usage

getEstimator(object, estimator = "gamma", Pmax = 0, type = "marginal")

Value

Return the estimator from an object of class GPTCM. It is a matrix or vector

Arguments

object

an object of class GPTCM

estimator

the name of one estimator. Default is the latent indicator estimator "gamma". Other options are among "c('beta', 'zeta', 'eta', 'xi', 'elpd', 'logP')"

Pmax

threshold that truncate the estimator "gamma" or "eta". Default is 0. If Pmax=0.5 and type="conditional", it gives median probability model betas

type

the type of output beta. Default is marginal, giving marginal beta estimation. If type="conditional", it gives beta estimation conditional on gamma=1

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)

gamma.hat <- getEstimator(fit, estimator = "gamma")

Run the code above in your browser using DataLab