Skip to contents

print method for class 'jmstanBig'

Usage

# S3 method for jmstanBig
print(x, ...)

Arguments

x

fitted object

...

others

Value

prints table containing various parameter estimates, SE, P- value for both survival and longitudinal submodel, if the model is bayesian it includes their credible interval too.

Examples


 # \donttest{
##
library(survival)
library(dplyr)
mod1<-jmstanBig(dtlong=long2,
         dtsurv = surv2,
         longm=y~ x7+visit+(1|id),
         survm=Surv(time,status)~x1+visit,
         samplesize=200,
         time_var='visit',id='id')
#> Fitting a univariate joint model.
#> 
#> Please note the warmup may be much slower than later iterations!
#> 
#> SAMPLING FOR MODEL 'jm' NOW (CHAIN 1).
#> Chain 1: 
#> Chain 1: Gradient evaluation took 0.00881 seconds
#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 88.1 seconds.
#> Chain 1: Adjust your expectations accordingly!
#> Chain 1: 
#> Chain 1: 
#> Chain 1: Iteration:    1 / 2000 [  0%]  (Warmup)
#> Chain 1: Iteration: 1001 / 2000 [ 50%]  (Sampling)
#> Chain 1: Iteration: 2000 / 2000 [100%]  (Sampling)
#> Chain 1: 
#> Chain 1:  Elapsed Time: 46.036 seconds (Warm-up)
#> Chain 1:                24.14 seconds (Sampling)
#> Chain 1:                70.176 seconds (Total)
#> Chain 1: 
#> Fitting a univariate joint model.
#> 
#> Please note the warmup may be much slower than later iterations!
#> 
#> SAMPLING FOR MODEL 'jm' NOW (CHAIN 1).
#> Chain 1: 
#> Chain 1: Gradient evaluation took 0.003599 seconds
#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 35.99 seconds.
#> Chain 1: Adjust your expectations accordingly!
#> Chain 1: 
#> Chain 1: 
#> Chain 1: Iteration:    1 / 2000 [  0%]  (Warmup)
#> Chain 1: Iteration: 1001 / 2000 [ 50%]  (Sampling)
#> Chain 1: Iteration: 2000 / 2000 [100%]  (Sampling)
#> Chain 1: 
#> Chain 1:  Elapsed Time: 38.053 seconds (Warm-up)
#> Chain 1:                27.137 seconds (Sampling)
#> Chain 1:                65.19 seconds (Total)
#> Chain 1: 
#> Fitting a univariate joint model.
#> 
#> Please note the warmup may be much slower than later iterations!
#> 
#> SAMPLING FOR MODEL 'jm' NOW (CHAIN 1).
#> Chain 1: 
#> Chain 1: Gradient evaluation took 0.003973 seconds
#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 39.73 seconds.
#> Chain 1: Adjust your expectations accordingly!
#> Chain 1: 
#> Chain 1: 
#> Chain 1: Iteration:    1 / 2000 [  0%]  (Warmup)
#> Chain 1: Iteration: 1001 / 2000 [ 50%]  (Sampling)
#> Chain 1: Iteration: 2000 / 2000 [100%]  (Sampling)
#> Chain 1: 
#> Chain 1:  Elapsed Time: 60.363 seconds (Warm-up)
#> Chain 1:                13.105 seconds (Sampling)
#> Chain 1:                73.468 seconds (Total)
#> Chain 1: 
#> Fitting a univariate joint model.
#> 
#> Please note the warmup may be much slower than later iterations!
#> 
#> SAMPLING FOR MODEL 'jm' NOW (CHAIN 1).
#> Chain 1: 
#> Chain 1: Gradient evaluation took 0.003774 seconds
#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 37.74 seconds.
#> Chain 1: Adjust your expectations accordingly!
#> Chain 1: 
#> Chain 1: 
#> Chain 1: Iteration:    1 / 2000 [  0%]  (Warmup)
#> Chain 1: Iteration: 1001 / 2000 [ 50%]  (Sampling)
#> Chain 1: Iteration: 2000 / 2000 [100%]  (Sampling)
#> Chain 1: 
#> Chain 1:  Elapsed Time: 51.011 seconds (Warm-up)
#> Chain 1:                16.763 seconds (Sampling)
#> Chain 1:                67.774 seconds (Total)
#> Chain 1: 
#> Fitting a univariate joint model.
#> 
#> Please note the warmup may be much slower than later iterations!
#> 
#> SAMPLING FOR MODEL 'jm' NOW (CHAIN 1).
#> Chain 1: 
#> Chain 1: Gradient evaluation took 0.002787 seconds
#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 27.87 seconds.
#> Chain 1: Adjust your expectations accordingly!
#> Chain 1: 
#> Chain 1: 
#> Chain 1: Iteration:    1 / 2000 [  0%]  (Warmup)
#> Chain 1: Iteration: 1001 / 2000 [ 50%]  (Sampling)
#> Chain 1: Iteration: 2000 / 2000 [100%]  (Sampling)
#> Chain 1: 
#> Chain 1:  Elapsed Time: 46.349 seconds (Warm-up)
#> Chain 1:                23.098 seconds (Sampling)
#> Chain 1:                69.447 seconds (Total)
#> Chain 1: 
#> Warning: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
#> Running the chains for more iterations may help. See
#> https://mc-stan.org/misc/warnings.html#bulk-ess
#> Warning: Tail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable.
#> Running the chains for more iterations may help. See
#> https://mc-stan.org/misc/warnings.html#tail-ess
print(mod1)
#> 
#>  Joint model for Big data using rstanarm
#>  Call: 
#> jmstanBig(dtlong = long2, dtsurv = surv2, longm = y ~ x7 + visit + 
#>     (1 | id), survm = Surv(time, status) ~ x1 + visit, samplesize = 200, 
#>     time_var = "visit", id = "id")
#> 
#> 
#>  Total observation in longitudinal data: 1000 
#> 
#>  Chunk size: 200 
#> 
#>  Longitudinal process: 
#>               Mean StDev   2.5%  97.5%  Zvalue Pvalue
#> (Intercept)  8.863 0.440  7.965  9.699  20.155  0.000
#> x7          -0.023 0.007 -0.036 -0.009  -3.443  0.001
#> visit       -0.081 0.024 -0.127 -0.033  -3.409  0.001
#> sigma        0.973 0.023  0.930  1.020  42.632  0.000
#> mean_PPD     7.249 0.041  7.167  7.331 175.646  0.000
#> 
#>  Survival process: 
#>                         Mean StDev    2.5%  97.5% Zvalue Pvalue
#> (Intercept)          -1.667 1.048  -3.672  0.502 -1.591  0.112
#> x11                   0.031 0.250  -0.458  0.502  0.125  0.901
#> visit                -0.134 0.089  -0.303  0.046 -1.509  0.131
#> b-splines-coef1      -2.904 1.436  -6.197 -0.539 -2.021  0.043
#> b-splines-coef2      -0.461 0.912  -2.277  1.353 -0.506  0.613
#> b-splines-coef3       0.486 0.666  -0.785  1.796  0.730  0.466
#> b-splines-coef4      -0.529 1.013  -2.581  1.434 -0.522  0.602
#> b-splines-coef5       2.411 1.701  -0.919  5.697  1.418  0.156
#> b-splines-coef6      -4.647 3.222 -11.868  0.768 -1.442  0.149
#> Assoc|Long1|etavalue -0.191 0.147  -0.489  0.079 -1.302  0.193
#> Random effects covariance matrix:
#>  Groups Name              Std.Dev.
#>  id     Long1|(Intercept) 1.1298  
# }