Joint model for BIG data using JMbayes2
jmbayesBig.Rd
function for joint model in BIG DATA using JMbayes2
Usage
jmbayesBig(
dtlong,
dtsurv,
longm,
survm,
samplesize = 50,
rd,
timeVar,
nchain = 1,
id,
niter = 2000,
nburnin = 1000
)
Arguments
- dtlong
longitudinal dataset, which contains id,visit time,longitudinal measurements along with various covariates
- dtsurv
survival dataset corresponding to the longitudinal dataset, with survival status and survival time
- longm
fixed effect model for longitudinal response
- survm
survival model
- samplesize
sample size to divide the Big data
- rd
random effect model part
- timeVar
time variable in longitudinal model, included in the longitudinal data
- nchain
number of chain for MCMC
- id
name of id column in longitudinal dataset
- niter
number of iteration for MCMC chain
- nburnin
number of burnin sample for MCMC chain
References
Rizopoulos, D., G. Papageorgiou, and P. Miranda Afonso. "JMbayes2: extended joint models for longitudinal and time-to-event data." R package version 0.2-4 (2022).
Examples
# \donttest{
##
library(survival)
library(nlme)
#>
#> Attaching package: 'nlme'
#> The following object is masked from 'package:dplyr':
#>
#> collapse
library(dplyr)
fit5<-jmbayesBig(dtlong=long2,dtsurv = surv2,longm=y~ x7+visit,survm=Surv(time,status)~x1+visit,
rd= ~ visit|id,timeVar='visit',nchain=1,samplesize=200,id='id')
ydt<-long2%>%filter(id%in%c(900))
cdt<-surv2[,'id']%>%filter(id%in%c(900))
newdata<-full_join(ydt,cdt,by='id')
P2<-predJMbayes(model<-fit5,ids<-c(900),newdata=newdata,process = 'event')
plot(P2$p1[[1]])
##
# }