predJMbayes {jmBIG}R Documentation

Prediction using JMbayes2

Description

prediction of survival probability and longitudinal marker using jmBayes2 for BIG data

Usage

predJMbayes(model, ids, process = "longitudinal", newdata, ...)

Arguments

model

fitted model object

ids

value of id

process

see jm

newdata

dataset having covariate information for the ids mentioned above.

...

other parameter options, see predict.jm

Value

list of predicted value for the given id

Examples


 
##
library(survival)
library(nlme)
library(dplyr)
jmcs1<-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')
mod3<-jmcs1
ydt<-long2%>%filter(id%in%c(900))
names(ydt)
cdt<-surv2[,'id']%>%filter(id%in%c(900))
names(cdt)
newdata<-full_join(ydt,cdt,by='id')
P2<-predJMbayes(model<-mod3,ids<-c(900),newdata=newdata,process = 'event')
plot(P2$p1[[1]])

##

   

[Package jmBIG version 0.1.2 Index]