blendsurv | R Documentation |
This is the main function in the blendR package. Two survival curves are supplied and blended according to the blending distribution characterised by the blending interval and the beta distribution parameters.
blendsurv(
obs_Surv,
ext_Surv,
blend_interv,
beta_params = list(alpha = 3, beta = 3),
times = NULL,
nsim = 100
)
obs_Surv , ext_Surv |
Observed and external data survival curves. These can come from survHE, INLA or flexsurv fits. |
blend_interv |
Maximum and minimum values for the blending interval. |
beta_params |
coefficients of a beta distribution |
times |
A vector of times for which the survival curves are to be computed; optional |
nsim |
The number of simulations from the distribution of the survival curves; default 100 |
List of S for observed, external and blended curves.
library(survHE)
## trial data
data("TA174_FCR", package = "blendR")
## externally estimated data
data_sim <- ext_surv_sim(t_info = 144,
S_info = 0.05,
T_max = 180)
obs_Surv <- fit.models(formula = Surv(death_t, death) ~ 1,
data = dat_FCR,
distr = "exponential",
method = "hmc")
ext_Surv <- fit.models(formula = Surv(time, event) ~ 1,
data = data_sim,
distr = "exponential",
method = "hmc")
blend_interv <- list(min = 48, max = 150)
beta_params <- list(alpha = 3, beta = 3)
ble_Surv <- blendsurv(obs_Surv, ext_Surv, blend_interv, beta_params)
plot(ble_Surv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.