Pretty printing for draws_rvars objects.
Arguments
- x
(draws) A
drawsobject or another R object for which the method is defined.- digits
(nonnegative integer) The minimum number of significant digits to print. If
NULL, defaults togetOption("posterior.digits", 2).- max_variables
(positive integer) The maximum number of variables to print. Can be controlled globally via the
"posterior.max_variables"option.- summary
(string) The style of summary to display:
"mean_sd"displaysmean ± sd"median_mad"displaysmedian ± mad"mode_entropy"displaysmode <entropy>, and is used automatically forrvar_factors. It shows normalized entropy, which ranges from 0 (all probability in one category) to 1 (uniform). Seeentropy()."mode_dissent"displaysmode <dissent>, and is used automatically forrvar_ordereds. It shows Tastle and Wierman's (2007) dissention measure, which ranges from 0 (all probability in one category) through 0.5 (uniform) to 1 (bimodal: all probability split equally between the first and last category). Seedissent().NULLusesgetOption("posterior.rvar_summary")(default"mean_sd)
- reserved
(logical) Should reserved variables be included in the output? Defaults to
FALSE. Seereserved_variablesfor an overview of currently reserved variable names.- ...
Further arguments passed to the underlying
print()methods.
Examples
x <- as_draws_rvars(example_draws())
print(x)
#> # A draws_rvars: 100 iterations, 4 chains, and 3 variables
#> $mu: rvar<100,4>[1] mean ± sd:
#> [1] 4.2 ± 3.4
#>
#> $tau: rvar<100,4>[1] mean ± sd:
#> [1] 4.2 ± 3.6
#>
#> $theta: rvar<100,4>[8] mean ± sd:
#> [1] 6.7 ± 6.3 5.3 ± 4.6 3.0 ± 6.8 4.9 ± 4.9 3.2 ± 5.1 4.0 ± 5.2 6.5 ± 5.3
#> [8] 4.6 ± 5.3
#>