jm.surv: Dynamic predictions of survival probabilites

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/JMsurv.R

Description

Dynamic predictions of survival probabilites P(T >= t | T >= s) for t >= s, given longitudinal measurements, covariate information, and survival up to time s.

Usage

1
2
jm.surv(bayes.fit, newsurvdata, newlongdata, st = NULL,
  control = list())

Arguments

bayes.fit

fit of the joint model using jmreg.aft.

newsurvdata

a data frame that contains covariate information for the time-to-event process. Names of the variables in newsurvdata must be the same as in the data frame that was used to fit the survival model using coxph.

newlongdata

a data frame that contains repeated measurements and covariate information for the longitudinal process. Names of the variables in newlongdata must be the same as in the data frame that was used to fit the linear mixed effects model using lme.

st

a numeric vector of times at which survival probabilities P(T >= t | T >= s) are to be computed. The first element must be s. If NULL, s is taken to be the last time at which the subject provided a longitudinal measurement, and t is seq(s,max.st,length=15), where max.st is floor(max(event times)).

control

a list of control values (see Details).

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:

Value

Posterior summeries of the survival probabilities.

Author(s)

Shahedul Khan <khan@math.usask.ca>

References

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.

See Also

jmreg.aft, jm.summary

Examples

 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))

sa4khan/AFTjmr documentation built on March 12, 2020, 1:24 a.m.