Gets coefficients for all the terms in an MCMC object.
Usage
# S3 method for class 'mcmc'
coef(
object,
conf_level = 0.95,
estimate = median,
simplify = TRUE,
directional_information = FALSE,
...
)Arguments
- object
The MCMC object to get the coefficients for
- conf_level
A number specifying the confidence level. By default 0.95.
- estimate
The function to use to calculate the estimate.
- simplify
- directional_information
A flag specifying whether the svalue column should be calculated using
extras::directional_information()instead ofextras::svalue(). The default value will change fromFALSEtoTRUEin a future release; set the argument explicitly to avoid the deprecation warning.- ...
Unused.
Value
An data frame of the coefficients with the columns indicating the
term, estimate,
lower and upper credible intervals and svalue
Examples
coef(mcmcr_example, directional_information = FALSE)
#> # A tibble: 7 × 5
#> term estimate lower upper svalue
#> <term> <dbl> <dbl> <dbl> <dbl>
#> 1 alpha[1] 3.72 2.21 5.23 9.65
#> 2 alpha[2] 4.72 3.21 6.23 9.65
#> 3 beta[1,1] 0.972 0.251 1.71 5.47
#> 4 beta[2,1] 1.97 1.25 2.71 7.64
#> 5 beta[1,2] 1.97 1.25 2.71 7.64
#> 6 beta[2,2] 2.97 2.25 3.71 9.65
#> 7 sigma 0.791 0.425 2.56 9.65
coef(mcmcr_example, directional_information = TRUE)
#> # A tibble: 7 × 5
#> term estimate lower upper svalue
#> <term> <dbl> <dbl> <dbl> <dbl>
#> 1 alpha[1] 3.72 2.21 5.23 9.64
#> 2 alpha[2] 4.72 3.21 6.23 9.64
#> 3 beta[1,1] 0.972 0.251 1.71 6.46
#> 4 beta[2,1] 1.97 1.25 2.71 8.64
#> 5 beta[1,2] 1.97 1.25 2.71 8.64
#> 6 beta[2,2] 2.97 2.25 3.71 9.64
#> 7 sigma 0.791 0.425 2.56 9.64
