postTraj | R Documentation |
rstanarm
prediction of the posterior trajectory for longitudinal marker while using rstanarm
for Big data
postTraj(model, m, ids, ...)
model |
fitted model object |
m |
m for |
ids |
value of id |
... |
other parameter option, see |
list of predicted values for the given id
##
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)
##
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.