compute_pfs {oncomsm} | R Documentation |
Compute progression-free-survival rate given sample
Description
compute_pfs()
computes the progression-free-survival rate at specified
times given a paramter sample.
Usage
compute_pfs(
model,
t,
parameter_sample = NULL,
warmup = 500L,
nsim = 1000L,
seed = NULL,
...
)
Arguments
model |
an object of class srpmodel containing prior information |
t |
a vector of time-points at which the PFS rate should be computed |
parameter_sample |
a stanfit object with samples from the respective model. |
warmup |
integer, number of warm-up samples for the MCMC sampler
before retaining samples; see |
nsim |
integer, number of samples to draw |
seed |
integer, fixed random seed; NULL for no fixed seed |
... |
further arguments passed to method implementations |
Value
a data frame with samples of PFS rates at each of the time points in the vector t.
Examples
mdl <- create_srpmodel(A = define_srp_prior())
smpl <- sample_prior(mdl, nsim = 500, seed = 34L)
dplyr::filter(
compute_pfs(mdl, t = seq(0, 12), parameter_sample = smpl),
iter == 1
)
[Package oncomsm version 0.1.4 Index]