Description Usage Arguments Details Value Author(s) References See Also Examples
Dynamic predictions of survival probabilites P(T >= t | T >= s)
for t >= s
,
given longitudinal measurements, covariate information, and survival up to time s
.
1 2 |
bayes.fit |
fit of the joint model using |
newsurvdata |
a data frame that contains covariate information for the time-to-event process.
Names of the variables in |
newlongdata |
a data frame that contains repeated measurements and covariate information for the longitudinal process.
Names of the variables in |
st |
a numeric vector of times at which survival probabilities |
control |
a list of control values (see Details). |
For estimation, we consider a Monte Carlo approach similar to the algorithm proposed by Rizopoulos (2016)
to construct a subject's profile (i.e., drawing a sample from the posterior distribution of b_i),
given a realization of the population parameters from the MCMC samples of the fitted joint model and
survival up to time s
. This is implemented in JAGS (Plummer, 2017).
control
: a list of control values with components:
n.sample
: size of the MCMC sample to be used to derive the posterior summeries of the conditional
probabilities (default is 200).
n.adapt
: number of steps for adaptation to draw b_i
(random effects), given a realization of the population parameters
from the MCMC samples of the fitted joint model and urvival up to time s
(default is 1000).
n.update
: burn-in iterations to draw b_i
(random effects), given a realization of the population parameters
from the MCMC samples of the fitted joint model and urvival up to time s
(default is 5000).
Posterior summeries of the survival probabilities.
Shahedul Khan <khan@math.usask.ca>
Plummer M, JAGS Version 4.3.0 user manual, 2017, http://people.stat.sc.edu/hansont/stat740/jags_user_manual.pdf.
Rizopoulos D, The R package JMbayes for fitting joint models for longitudinal and time-to-event data Using MCMC, Journal of Statistical Software, 72(7): 1-45, 2016.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(JM)
data(aids.id)
data(aids)
surv.fit<-coxph(Surv(Time,death)~drug+gender+prevOI+AZT,
data=aids.id,x=TRUE)
lme.fit<-lme(CD4~obstime+obstime:drug+gender+prevOI+AZT,
random=~obstime|patient,data=aids)
jmfit.gg<-jmreg.aft(surv.fit=surv.fit,lme.fit=lme.fit,
surv.model="ggamma",rand.model="simple",timevar="obstime",
n.chain=2,n.adapt = 5000, n.burn = 15000,
n.iter = 150000, n.thin = 5)
newsurvdata<-data.frame(aids.id[aids.id$patient==409,])
newlongdata<-data.frame(aids[aids$patient==409,])
surv.id0<-jm.surv(bayes.fit=jmfit.gg,newsurvdata=newsurvdata,newlongdata=newlongdata)
newsurvdata<-data.frame(aids.id[aids.id$patient==404,])
newlongdata<-data.frame(aids[aids$patient==404,])
surv.id1<-jm.surv(bayes.fit=jmfit.gg,newsurvdata=newsurvdata,newlongdata=newlongdata)
plot(surv.id1[[1]][,1],surv.id1[[1]][,2],ylim=c(0.38,1),
type="l",lty=2,xlab="Time (t)", ylab="P(T > t | T > 12)")
lines(surv.id0[[1]][,1],surv.id0[[1]][,2],lty=1)
legend("topright",legend=c("Patient id # 409","Patient id # 404"),lty=c(1,2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.