Summarise basic parameter estimates from an msmbayes model
Usage
# S3 method for msmbayes
summary(object, log = FALSE, time = FALSE, ...)
Value
A data frame with one row for each basic model parameter,
plus rows for the mean sojourn times. The posterior distribution
for the parameter is encoded in the column value
, which
has the rvar
data type defined by the posterior
package. This distribution can be summarised in any way by
calling summary
again on the data frame (see the
examples).
A string summarising a sample from the prior distribution, as a
median and 95% equal-tailed credible interval, is given in the
prior
column.
Transition intensities, or transformations of transition intensities, are those for covariate values of zero.
Remaining parameters (in non-HMMs) are log hazard ratios for covariate effects.
Examples
summary(infsim_model)
#> # A tibble: 4 × 6
#> name from to value prior rhat
#> <chr> <int> <int> <rvar[1d]> <chr> <dbl>
#> 1 q 1 2 0.67 ± NA 0.14 (0.0031, 6) NA
#> 2 q 2 1 3.86 ± NA 0.14 (0.0031, 6) NA
#> 3 mst 1 NA 1.50 ± NA 7.4 (0.17, 326) NA
#> 4 mst 2 NA 0.26 ± NA 7.4 (0.17, 326) NA
summary(summary(infsim_model))
#> name from to prior rhat mean median sd mad q5
#> 1 q 1 2 0.14 (0.0031, 6) NA 0.6661110 0.6661110 NA 0 0.6661110
#> 2 q 2 1 0.14 (0.0031, 6) NA 3.8606671 3.8606671 NA 0 3.8606671
#> 3 mst 1 NA 7.4 (0.17, 326) NA 1.5012514 1.5012514 NA 0 1.5012514
#> 4 mst 2 NA 7.4 (0.17, 326) NA 0.2590226 0.2590226 NA 0 0.2590226
#> q95 rhat ess_bulk ess_tail
#> 1 0.6661110 NA NA NA
#> 2 3.8606671 NA NA NA
#> 3 1.5012514 NA NA NA
#> 4 0.2590226 NA NA NA
summary(summary(infsim_model), median, ~quantile(.x, 0.025, 0.975))
#> name from to prior rhat median 2.5%
#> 1 q 1 2 0.14 (0.0031, 6) NA 0.6661110 0.6661110
#> 2 q 2 1 0.14 (0.0031, 6) NA 3.8606671 3.8606671
#> 3 mst 1 NA 7.4 (0.17, 326) NA 1.5012514 1.5012514
#> 4 mst 2 NA 7.4 (0.17, 326) NA 0.2590226 0.2590226