Learn R Programming

jmBIG (version 0.1.3)

postSurvfit: Prediction using rstanarm

Description

posterior survival probability estimates from rstanarm for BIG data

Usage

postSurvfit(model, ids, ...)

Value

list of predicted value for the given id

Arguments

model

fitted model

ids

value of id

...

other parameter option, see posterior_survfit

Examples

Run this code
 # \donttest{
##
library(survival)
library(dplyr)
jmstan<-jmstanBig(dtlong=long2,
         dtsurv = surv2,
         longm=y~ x7+visit+(1|id),
         survm=Surv(time,status)~x1+visit,
         samplesize=200,
         time_var='visit',id='id')
mod1<-jmstan
P2<-postSurvfit(model<-mod1,ids<-c(1,2,210))
pp1<-plot(P2$p1[[1]])
pp1
pp2<-plot(P2$p1[[2]])
pp2
pp3<-plot(P2$p1[[3]])
pp3
 ##
   # }

Run the code above in your browser using DataLab