jmstanBig {jmBIG} | R Documentation |
Joint model for BIG data using rstanarm
Description
function for joint model in BIG DATA using rstanarm
package
Usage
jmstanBig(
dtlong,
dtsurv,
longm,
survm,
samplesize = 50,
time_var,
id,
nchain = 1,
refresh = 2000
)
Arguments
dtlong |
longitudinal dataset, which contains id,visit time,longitudinal measurements along with various covariates |
dtsurv |
survival dataset corresponding to the longitudinal dataset, with survival status and survival time |
longm |
model for longitudinal response |
survm |
survival model |
samplesize |
sample size to divide the Big data |
time_var |
time variable in longitudinal model, included in the longitudinal data |
id |
name of id column in longitudinal dataset |
nchain |
number of chain for MCMC |
refresh |
refresh rate for MCMC chain |
Value
returns a list containing various output which are useful for prediction.
Author(s)
Atanu Bhattacharjee, Bhrigu Kumar Rajbongshi and Gajendra Kumar Vishwakarma
References
Goodrich, B., et al. "rstanarm: Bayesian applied regression modeling via Stan. R package version 2.17. 4." Online< http://mc-stan. org (2018).
See Also
Examples
##
library(survival)
library(dplyr)
fit3<-jmstanBig(dtlong=long2,dtsurv = surv2,longm=y~ x7+visit+(1|id),
survm=Surv(time,status)~x1+visit,samplesize=200,time_var='visit',id='id')
P2<-postTraj(model<-fit3,m<-1,ids<-c(1,2,100))
pp1<-plot(P2$p1[[1]],plot_observed = TRUE)
pp2<-plot(P2$p1[[2]],plot_observed = TRUE)
pp3<-plot(P2$p1[[3]],plot_observed = TRUE)
##