# Exported functions
export(anova.JMbayes, aucJM, bma.combine, cvDCL, dynCJM, dynInfo, dgt, 
       extract_lmeComponents, marglogLik, mvglmer, mvJointModelBayes, coef.JMbayes, 
       dbs, dns, fixef.JMbayes, jointModelBayes, ibs, ins, IndvPred_lme, 
       logLik.JMbayes, pgt, plot.JMbayes, 
       plot.survfit.JMbayes, prederrJM, predict.JMbayes, ranef.JMbayes, rgt, rocJM, 
       runDynPred, survfitJM, qgt, xtable.JMbayes, tve, predict_eventTime,
       find_thresholds)

# Imported functions
importFrom("nlme", "fixed.effects", "fixef", "random.effects", "ranef",
  "pdMatrix", "getVarCov")
importFrom("survival", "survfit", "coxph", "survreg")
importFrom("splines", "ns", "bs", "splineDesign")
importFrom("MASS", "mvrnorm")
importFrom("Hmisc", "wtd.quantile", "wtd.var")
importFrom("grDevices", "dev.cur", "dev.size", "xy.coords")
importFrom("graphics", "abline", "axis", "lines", "matlines", "matplot", 
  "mtext", "par", "plot", "points", "polygon", "segments")
importFrom("stats", "acf", "ar", "as.formula", "ave", "bw.SJ", "coef",
  "cov2cor", "delete.response", "density", "dgamma", "dnorm", "drop.terms", 
  "dt", "dunif", "fitted", "formula", "lag", "lm.fit", "logLik", "mad", 
  "median", "model.frame", "model.frame.default", "model.matrix",
  "model.matrix.default", "model.response", "optim", "pnorm", "pt", "qt", 
  "quantile", "rWishart", "rchisq", "reformulate", "rexp", "rgamma", 
  "rnorm", "rt", "runif", "sd", "terms", "var", "vcov", "makepredictcall",
  "model.offset", "complete.cases", ".getXlevels", "cov.wt", "terms.formula", "integrate")
importFrom("utils", "as.relistable", "combn", "glob2rx", "head", "relist", 
  "setTxtProgressBar", "tail", "txtProgressBar", "object.size")
importFrom("Rcpp", "evalCpp")
importFrom("jagsUI", "jags")
importFrom("rstan", "stan", "extract", "get_elapsed_time")
importFrom("parallel", "makeCluster", "stopCluster", "detectCores")
importFrom("doParallel", "registerDoParallel", "stopImplicitCluster")
importFrom("xtable", "xtable")
importFrom("foreach", "foreach", "%dopar%")
importFrom("graphics", "box")

useDynLib(JMbayes, .registration = TRUE)


# S3 methods
S3method(anova, JMbayes)
S3method(aucJM, JMbayes)
S3method(aucJM, mvJMbayes)
S3method(aucJM, coxph)
S3method(coef, JMbayes)
S3method(coef, summary.JMbayes)
S3method(confint, JMbayes)
S3method(dynCJM, JMbayes)
S3method(dynCJM, coxph)
S3method(find_thresholds, mvJMbayes)
S3method(fixef, JMbayes)
S3method(fixef, mvglmer)
S3method(fixef, mvJMbayes)
S3method(fitted, JMbayes)
S3method(fitted, mvJMbayes)
S3method(logLik, JMbayes)
S3method(makepredictcall, dbs)
S3method(makepredictcall, dns)
S3method(makepredictcall, ibs)
S3method(makepredictcall, ins)
S3method(makepredictcall, tve)
S3method(plot, JMbayes)
S3method(plot, mvJMbayes)
S3method(plot, mvglmer)
S3method(plot, rocJM)
S3method(plot, survfit.JMbayes)
S3method(plot, survfit.mvJMbayes)
S3method(predict, JMbayes)
S3method(predict_eventTime, mvJMbayes)
S3method(print, aucJM)
S3method(print, dynCJM)
S3method(print, JMbayes)
S3method(print, prederrJM)
S3method(print, rocJM)
S3method(print, summary.JMbayes)
S3method(print, summary.mvJMbayes)
S3method(print, summary.mvglmer)
S3method(print, survfit.JMbayes)
S3method(print, survfit.mvJMbayes)
S3method(ranef, JMbayes)
S3method(ranef, mvJMbayes)
S3method(residuals, JMbayes)
S3method(rocJM, JMbayes)
S3method(rocJM, mvJMbayes)
S3method(summary, JMbayes)
S3method(summary, mvglmer)
S3method(summary, mvJMbayes)
S3method(survfitJM, JMbayes)
S3method(survfitJM, mvJMbayes)
S3method(prederrJM, JMbayes)
S3method(prederrJM, mvJMbayes)
S3method(prederrJM, coxph)
S3method(vcov, JMbayes)
