jointCureModel: Estimation of the joint longitudinal time-to-event models...

Description Usage Arguments Value Author(s) References Examples

View source: R/jointCureModel.R

Description

Function using JAGS to estimate the joint longitudinal survival models with cure fraction: mixutre cure model (MCmodel) [Farewell, 1982], joint latent class cure model (JLCCmodel), full joint cure model (FJCmodel) [Law et al. 2002, Yu et al. 2004,2008]. This function is an extansion (or modification) to the cure framework of the jointModelBayes function from the JMbayes package (version 0.4-1 implemented by Dimitris Rizopoulos).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
jointCureModel(
  formFixed,
  formRandom,
  formLatency,
  formIncidence,
  formID,
  IdVar,
  data,
  timeVar,
  jointCureModel = "FJCmodel",
  survMod = "weibull-PH",
  param = "shared-RE",
  Infprior_cure = F,
  smcure_out = NULL,
  classif_trick = TRUE,
  cov_prior = "inverse-gamma",
  Sigma_d = FALSE,
  n.chains = 1,
  n.iter = 10000,
  n.burnin = 5000,
  n.thin = 1,
  n.adapt = 5000,
  C = 1,
  priorTau = 100,
  out_data = T
)

Arguments

formFixed

formula for fixed part of longitudinal submodel with response variable

formRandom

formula for random part of longitudinal submodel without response variable

formLatency

survival formula as formula in survival package for latency submodel

formIncidence

formula specifying covariate in incidence submodel

formID

formula specifying the ID variable (e.g. = ~ subject)

IdVar

string specify the names of ID variable (Id subject)

data

dataset of observed variables

timeVar

string specify the names of time variable (time of repeated measurements)

jointCureModel

joint cure model to estimate including: "MCmodel","JLCCmodel","FJCmodel"

survMod

form of survival submodel (only "weibull-PH" is available until now)

param

shared association for "FJCmodel": "shared-RE" (default) or "td-value"

Infprior_cure

most of prior distributions are data-driven if 'TRUE', otherwise vague priors are considered

smcure_out

estimated model from smcure package, otherwise is NULL by default

classif_trick

if TRUE, subjects are cured if t_obs>max(t_obs(delta==1), otherwise D is only know for subjects having developed the event Taylor's rule about the cure status, D==0 if T_obs>max(t_obs[which(delta==1)])

cov_prior

="wishart" prior distribtion for random effect covariance matrix or ="inverse-gamma" for independent prior distribtions with random effect variance matrix

Sigma_d

if TRUE, the random effect matrix is class-specific, otherwise the matrix is defined for the whole population

n.chains

the number of parallel chains for the model; default is 1.

n.iter

nteger specifying the total number of iterations; default is 10000

n.burnin

integer specifying how many of n.iter to discard as burn-in ; default is 5000

n.thin

integer specifying the thinning of the chains; default is 1

n.adapt

integer specifying the number of iterations to use for adaptation; default is 5000

C

positive integer for the zero trick used to define the likelihood in JAGS, default is 1

priorTau

variance by default for vague prior distribution

out_data

Boolean such as TRUE if you want the data of different submodels in output or FALSE otherwise

Value

A JMcuR object which is a list with the following elements:

Coefficients

list of posterior mean of each parameter

Modes

list of posterior modes compute from the posterior samples of the parameters

Sd

list of Standard deviation of each parameters

sims.list

list of the MCMC chains of the parameters

Author(s)

Antoine Barbieri and Catherine Legrand

References

Barbieri A and Legrand C. (2019). Joint longitudinal and time-to-event cure models for the assessment of being cured. Statistical Methods in Medical Research. doi: 10.1177/0962280219853599.

Proust-Lima C, Philipps V and Liquet B. (2017). Estimation of Extended Mixed Models Using Latent Classes and Latent Processes: The R Package lcmm. Journal of Statistical Software; 78(2).

Rizopoulos, D. (2016). The R Package JMbayes for Fitting Joint Models for Longitudinal and Time-to-Event Data Using MCMC. Journal of Statistical Software, 72(7), 1-46.

Yu M, Taylor JMG and Sandler HM. (2008). Individual Prediction in Prostate Cancer Studies Using a Joint Longitudinal Survival-Cure Model. Journal of the American Statistical Association; 103(481): 178-187.

Yu M, Law NJ, Taylor JMG et al. (2004). Joint longitudinal-survival-cure models and their application to prostate cancer. Statistica Sinica; 14(3): 835-862.

Law NJ, Taylor JMG and Sandler H. (2002). The joint modeling of a longitudinal disease progression marker and the failure time process in the presence of cure. Biostatistics; 3(4): 547-563.

Taylor JMG. (1995) Semi-Parametric Estimation in Failure Time Mixture Models. Biometrics 1995; 51(3): 899-907.

Examples

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
## For the exemple(s), use the data 'aids' from joineR package
data("aids", package = "joineR")

## estimation of the MCM for parameter initialisation
aids.id <- unique(aids[,c("id","time","death","drug","gender","prevOI","AZT")])
aids.id2 <- aids.id
aids.id2$drug <- as.numeric(aids.id$drug)-1
aids.id2$gender <- as.numeric(aids.id$gender)-1
aids.id2$prevOI <- as.numeric(aids.id$prevOI)-1
aids.id2$AZT <- as.numeric(aids.id$AZT)-1
smcure_out <- smcure(Surv(time, death) ~ drug + gender + prevOI + AZT,
                     cureform=~ drug + gender + prevOI + AZT,
                     data = aids.id2,
                     model="ph")

## Estimation of the joint latent class cure model (JLCCM)
JLCCM <- jointCureModel(formFixed = CD4 ~ obstime + drug + gender + prevOI + AZT,
                        formRandom = ~ obstime,
                        timeVar= "obstime",
                        formLatency = Surv(time, death) ~ drug + gender + prevOI + AZT,
                        formIncidence = ~ drug + gender + prevOI + AZT,
                        formID= ~ id,
                        IdVar = "id",
                        data = aids,
                        # model specifications
                        jointCureModel = "JLCCmodel",
                        survMod = "weibull-PH",
                        param = "shared-RE",
                        # prior options
                        n.iter = 1000,
                        n.burnin = 500,
                        Infprior_cure = TRUE,
                        smcure_out = smcure_out,
                        priorTau = 100,
                        # classification options
                        classif_trick = TRUE,
                        cov_prior = "inverse-gamma",
                        Sigma_d = TRUE)

## details of the estimated model
summary(JLCCM)

## Not run: 
## Estimation of the full joint cure model given shared curent value (FJCM_A1)
FJCM_A1 <- jointCureModel(formFixed = CD4 ~ obstime,
                         formRandom = ~ obstime,
                         timeVar= "obstime",
                         formLatency = Surv(time, death) ~ drug + gender + prevOI + AZT,
                         formIncidence = ~ drug + gender + prevOI + AZT,
                         formID= ~ id,
                         IdVar = "id",
                         data = aids,
                         # model specifications
                         jointCureModel = "FJCmodel",
                         survMod = "weibull-PH",
                         param = "td-value",
                         # prior options
                         Infprior_cure = TRUE,
                         smcure_out = smcure_out,
                         priorTau = 100,
                         # classification options
                         classif_trick = TRUE,
                         cov_prior = "inverse-gamma",
                         Sigma_d = TRUE,
                         # MCMC options
                         n.chains = 1, n.iter = 10000, n.burnin = 5000, n.thin = 1, n.adapt = 5000, C = 1,
                         # out option
                         out_data=T)

## details of the estimated model
summary(FJCM_A1)

## Estimation of the full joint cure model given shared curent value (FJCM_A1)
FJCM_A2 <- jointCureModel(formFixed = CD4 ~ obstime,
                         formRandom = ~ obstime,
                         timeVar= "obstime",
                         formLatency = Surv(time, death) ~ drug + gender + prevOI + AZT,
                         formIncidence = ~ drug + gender + prevOI + AZT,
                         formID= ~ id,
                         IdVar = "id",
                         data = aids,
                         # model specifications
                         jointCureModel = "FJCmodel",
                         survMod = "weibull-PH",
                         param = "shared-RE",
                         # prior options
                         Infprior_cure = TRUE,
                         smcure_out = smcure_out,
                         priorTau = 100,
                         # classification options
                         classif_trick = TRUE,
                         cov_prior = "inverse-gamma",
                         Sigma_d = TRUE,
                         # MCMC options
                         n.chains = 1, n.iter = 10000, n.burnin = 5000, n.thin = 1, n.adapt = 5000, C = 1,
                         # out option
                         out_data=T)

## details of the estimated model
summary(FJCM_A2)

## End(Not run)

AntoineBbi/JMcuR documentation built on Oct. 1, 2020, 1:31 a.m.