postTraj: Prediction using 'rstanarm'

View source: R/prediction.R

postTrajR Documentation

Prediction using rstanarm

Description

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

Usage

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

Arguments

model

fitted model object

m

m for posterior_traj function

ids

value of id

...

other parameter option, see posterior_traj

Value

list of predicted values for the given id

Examples

 
##
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)
##
   

jmBIG documentation built on May 29, 2024, 6:04 a.m.

Related to postTraj in jmBIG...