Learn R Programming

jmBIG (version 0.1.3)

postTraj: Prediction using rstanarm

Description

prediction of the posterior trajectory for longitudinal marker while using rstanarm for Big data

Usage

postTraj(model, m, ids, ...)

Value

list of predicted values for the given id

Arguments

model

fitted model object

m

m for posterior_traj function

ids

value of id

...

other parameter option, see posterior_traj

Examples

Run this code
 # \donttest{
##
library(survival)
library(dplyr)
fit6<-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<-fit6,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)
##
   # }

Run the code above in your browser using DataLab