Skip to contents

The function fits joint model for survival data with two events. It utilizes the joineRML package for obtaining the model parameter estimates.

Usage

jmrmlB(
  dtlong,
  dtsurv,
  longm,
  survm,
  rd,
  timeVar,
  id,
  samplesize = 200,
  BIGdata = FALSE
)

Arguments

dtlong

longitudinal data

dtsurv

survival data with two event status along with event time

longm

longitudinal model e.g. list(serBilir~drug * year,serBilir ~ drug * year)

survm

survival model e.g. list(Surv(years,status2)~drug,Surv(time_2,status_2)~drug+age)

rd

random effect component e.g. list(~year|id,~year|id)

timeVar

time variable

id

ID variable

samplesize

samplesize for bigdata

BIGdata

logical argument TRUE or FALSE

Value

Estimated model parameters of Joint model with bidirectional survival data

References

Hickey, Graeme L., et al. "joineRML: a joint model and software package for time-to-event and multivariate longitudinal outcomes." BMC medical research methodology 18 (2018): 1-14.

Bhattacharjee, A., Rajbongshi, B. K., & Vishwakarma, G. K. (2024). jmBIG: enhancing dynamic risk prediction and personalized medicine through joint modeling of longitudinal and survival data in big routinely collected data. BMC Medical Research Methodology, 24(1), 172.

Author

Atanu Bhattacharjee, Bhrigu Kumar Rajbongshi and Gajendra Kumar Vishwakarma

Examples

 # \donttest{
##
library(JMbayes2)
library(joineRML)
jmrmlBModel<-jmrmlB(dtlong=new_long2[new_long2$id%in%c(1:80),],
                    dtsurv=new_surv2[new_surv2$id%in%c(1:80),],
                    longm=list(y~x7+visit,y~x7+visit),survm=list(Surv(time,status)~x1+visit,
                    Surv(time_2,status_2)~x1+visit),rd=list(~visit|id,~visit|id),id='id',
                    timeVar='visit',samplesize=40,BIGdata=TRUE)
#> EM algorithm has converged!
#> Calculating post model fit statistics...
#> EM algorithm has converged!
#> Calculating post model fit statistics...
#> EM algorithm has converged!
#> Calculating post model fit statistics...
#> EM algorithm has converged!
#> Calculating post model fit statistics...
jmrmlBModel
#> 
#>  Summary of first joint model with Event 1: 
#>  -------------------------------------------
#>  Joint model for Big data using joineRML
#>  Call: 
#> joinRMLBig(dtlong = dtlong, dtsurv = dtsurv, longm = longm1, 
#>     survm = survm1, samplesize = samplesize, rd = rd1, timeVar = timeVar, 
#>     id = id)
#> 
#> 
#>  Total observation in longitudinal data: 80 
#> 
#>  Chunk size: 40 
#> 
#>  Longitudinal process: 
#>               Estimate    SE   Zvalue Pvalue
#> (Intercept)_1    8.830 0.922    9.578      0
#> x7_1            -0.024 0.000 -111.075      0
#> visit_1         -0.068 0.009   -7.536      0
#> sigma2_1         0.506 0.001  353.358      0
#> 
#>  Survival process: 
#>          Estimate    SE ZValue Pvalue
#> x11        0.924 0.431  2.144  0.032
#> visit     -0.290 0.057 -5.140  0.000
#> gamma_1    0.013 0.043  0.312  0.755
#> 
#>  Variance Covariance matrix of Random effects:
#>           Intercept  visit
#> Intercept     1.619 -0.214
#> visit        -0.214  0.090
#> 
#>  Summary of second joint model with Event 2: 
#>  -------------------------------------------
#>  Joint model for Big data using joineRML
#>  Call: 
#> joinRMLBig(dtlong = dtlong, dtsurv = dtsurv, longm = longm2, 
#>     survm = survm2, samplesize = samplesize, rd = rd2, timeVar = timeVar, 
#>     id = id)
#> 
#> 
#>  Total observation in longitudinal data: 80 
#> 
#>  Chunk size: 40 
#> 
#>  Longitudinal process: 
#>               Estimate    SE   Zvalue Pvalue
#> (Intercept)_1    8.770 0.910    9.632      0
#> x7_1            -0.023 0.000 -111.950      0
#> visit_1         -0.071 0.009   -7.492      0
#> sigma2_1         0.514 0.002  312.213      0
#> 
#>  Survival process: 
#>          Estimate    SE ZValue Pvalue
#> x11        0.099 0.192  0.516  0.606
#> visit     -0.101 0.016 -6.446  0.000
#> gamma_1   -0.027 0.015 -1.853  0.064
#> 
#>  Variance Covariance matrix of Random effects:
#>           Intercept  visit
#> Intercept     1.659 -0.210
#> visit        -0.210  0.081
##
# }