jm.summary: Summary of a joint model fit

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

View source: R/JMsummary.R

Description

Produce a summary of the fit, including density, trace and autocorrelation plots.

Usage

1
2
jm.summary(bayes.fit, trace.plot = FALSE, density.plot = FALSE,
  autocorr.plot = FALSE)

Arguments

bayes.fit

fit of the joint model using jmreg.aft.

trace.plot

produce trace plots if TRUE (default is FALSE).

density.plot

produce density plots if TRUE (default is FALSE).

autocorr.plot

produce autocorrelation plots if TRUE (default is FALSE).

Details

The coda package (Plummer et al., 2006) is used to summarize and plot the output from MCMC simulations. It also includes Gelman-Rubin statistic for convergence diagnostic.

Value

Returns posterior summaries of the parameters, including posterior mean, median, standard deviation, 0.025 and 0.975 quantiles, and Gelman-Rubin statistic values. It also returns some basic information about the model, computational time, and MCMC simulation setup.

Author(s)

Shahedul Khan <khan@math.usask.ca>

References

Plummer M, Best N, Cowles K, and Vines K, CODA: Convergence diagnosis and output analysis for MCMC, R News, 6: 7-11, 2006.

See Also

jm.DIC, jmreg.aft, jm.WAIC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Consider the pbc data from package JM.
  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.ew<-jmreg.aft(surv.fit=surv.fit,lme.fit=lme.fit,
         surv.model="eweibull",rand.model="simple",timevar="obstime",
         n.chain=2,n.adapt = 5000, n.burn = 15000, 
         n.iter = 150000, n.thin = 5)
  jm.summary(jmfit.ew,trace.plot=TRUE,density.plot=TRUE)

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