Skip to contents

Create reports for Bayesian models. The description of the parameters follows the Sequential Effect eXistence and sIgnificance Testing framework (see SEXIT documentation).

Usage

# S3 method for class 'brmsfit'
report(x, ...)

Arguments

x

Object of class lm or glm.

...

Arguments passed to or from other methods.

Value

An object of class report().

Examples

# \donttest{
# Bayesian models
library(brms)
model <- suppressWarnings(brm(mpg ~ qsec + wt, data = mtcars, refresh = 0, iter = 300))
#> Compiling Stan program...
#> Start sampling
r <- report(model, verbose = FALSE)
#> Start sampling
r
#> We fitted a Bayesian linear model (estimated using MCMC sampling with 4 chains
#> of 300 iterations and a warmup of 150) to predict mpg with qsec and wt
#> (formula: mpg ~ qsec + wt). Priors over parameters were set as student_t
#> (location = 19.20, scale = 5.40) distributions. The model's explanatory power
#> is substantial (R2 = 0.82, 95% CI [0.74, 0.85], adj. R2 = 0.79).  Within this
#> model:
#> 
#>   - The effect of b Intercept (Median = 19.98, 95% CI [6.72, 31.30]) has a 99.50%
#> probability of being positive (> 0), 99.50% of being significant (> 0.30), and
#> 99.00% of being large (> 1.81). The estimation successfully converged (Rhat =
#> 1.004) but the indices are unreliable (ESS = 434)
#>   - The effect of b qsec (Median = 0.92, 95% CI [0.35, 1.56]) has a 99.83%
#> probability of being positive (> 0), 98.00% of being significant (> 0.30), and
#> 0.50% of being large (> 1.81). The estimation successfully converged (Rhat =
#> 1.006) but the indices are unreliable (ESS = 542)
#>   - The effect of b wt (Median = -5.08, 95% CI [-6.02, -4.02]) has a 100.00%
#> probability of being negative (< 0), 100.00% of being significant (< -0.30),
#> and 100.00% of being large (< -1.81). The estimation successfully converged
#> (Rhat = 1.004) but the indices are unreliable (ESS = 377)
#> 
#> Following the Sequential Effect eXistence and sIgnificance Testing (SEXIT)
#> framework, we report the median of the posterior distribution and its 95% CI
#> (Highest Density Interval), along the probability of direction (pd), the
#> probability of significance and the probability of being large. The thresholds
#> beyond which the effect is considered as significant (i.e., non-negligible) and
#> large are |0.30| and |1.81| (corresponding respectively to 0.05 and 0.30 of the
#> outcome's SD). Convergence and stability of the Bayesian sampling has been
#> assessed using R-hat, which should be below 1.01 (Vehtari et al., 2019), and
#> Effective Sample Size (ESS), which should be greater than 1000 (Burkner,
#> 2017)., We fitted a Bayesian linear model (estimated using MCMC sampling with 4
#> chains of 300 iterations and a warmup of 150) to predict mpg with qsec and wt
#> (formula: mpg ~ qsec + wt). Priors over parameters were set as uniform
#> (location = , scale = ) distributions. The model's explanatory power is
#> substantial (R2 = 0.82, 95% CI [0.74, 0.85], adj. R2 = 0.79).  Within this
#> model:
#> 
#>   - The effect of b Intercept (Median = 19.98, 95% CI [6.72, 31.30]) has a 99.50%
#> probability of being positive (> 0), 99.50% of being significant (> 0.30), and
#> 99.00% of being large (> 1.81). The estimation successfully converged (Rhat =
#> 1.004) but the indices are unreliable (ESS = 434)
#>   - The effect of b qsec (Median = 0.92, 95% CI [0.35, 1.56]) has a 99.83%
#> probability of being positive (> 0), 98.00% of being significant (> 0.30), and
#> 0.50% of being large (> 1.81). The estimation successfully converged (Rhat =
#> 1.006) but the indices are unreliable (ESS = 542)
#>   - The effect of b wt (Median = -5.08, 95% CI [-6.02, -4.02]) has a 100.00%
#> probability of being negative (< 0), 100.00% of being significant (< -0.30),
#> and 100.00% of being large (< -1.81). The estimation successfully converged
#> (Rhat = 1.004) but the indices are unreliable (ESS = 377)
#> 
#> Following the Sequential Effect eXistence and sIgnificance Testing (SEXIT)
#> framework, we report the median of the posterior distribution and its 95% CI
#> (Highest Density Interval), along the probability of direction (pd), the
#> probability of significance and the probability of being large. The thresholds
#> beyond which the effect is considered as significant (i.e., non-negligible) and
#> large are |0.30| and |1.81| (corresponding respectively to 0.05 and 0.30 of the
#> outcome's SD). Convergence and stability of the Bayesian sampling has been
#> assessed using R-hat, which should be below 1.01 (Vehtari et al., 2019), and
#> Effective Sample Size (ESS), which should be greater than 1000 (Burkner,
#> 2017)., We fitted a Bayesian linear model (estimated using MCMC sampling with 4
#> chains of 300 iterations and a warmup of 150) to predict mpg with qsec and wt
#> (formula: mpg ~ qsec + wt). Priors over parameters were set as uniform
#> (location = , scale = ) distributions. The model's explanatory power is
#> substantial (R2 = 0.82, 95% CI [0.74, 0.85], adj. R2 = 0.79).  Within this
#> model:
#> 
#>   - The effect of b Intercept (Median = 19.98, 95% CI [6.72, 31.30]) has a 99.50%
#> probability of being positive (> 0), 99.50% of being significant (> 0.30), and
#> 99.00% of being large (> 1.81). The estimation successfully converged (Rhat =
#> 1.004) but the indices are unreliable (ESS = 434)
#>   - The effect of b qsec (Median = 0.92, 95% CI [0.35, 1.56]) has a 99.83%
#> probability of being positive (> 0), 98.00% of being significant (> 0.30), and
#> 0.50% of being large (> 1.81). The estimation successfully converged (Rhat =
#> 1.006) but the indices are unreliable (ESS = 542)
#>   - The effect of b wt (Median = -5.08, 95% CI [-6.02, -4.02]) has a 100.00%
#> probability of being negative (< 0), 100.00% of being significant (< -0.30),
#> and 100.00% of being large (< -1.81). The estimation successfully converged
#> (Rhat = 1.004) but the indices are unreliable (ESS = 377)
#> 
#> Following the Sequential Effect eXistence and sIgnificance Testing (SEXIT)
#> framework, we report the median of the posterior distribution and its 95% CI
#> (Highest Density Interval), along the probability of direction (pd), the
#> probability of significance and the probability of being large. The thresholds
#> beyond which the effect is considered as significant (i.e., non-negligible) and
#> large are |0.30| and |1.81| (corresponding respectively to 0.05 and 0.30 of the
#> outcome's SD). Convergence and stability of the Bayesian sampling has been
#> assessed using R-hat, which should be below 1.01 (Vehtari et al., 2019), and
#> Effective Sample Size (ESS), which should be greater than 1000 (Burkner, 2017).
#> and We fitted a Bayesian linear model (estimated using MCMC sampling with 4
#> chains of 300 iterations and a warmup of 150) to predict mpg with qsec and wt
#> (formula: mpg ~ qsec + wt). Priors over parameters were set as student_t
#> (location = 0.00, scale = 5.40) distributions. The model's explanatory power is
#> substantial (R2 = 0.82, 95% CI [0.74, 0.85], adj. R2 = 0.79).  Within this
#> model:
#> 
#>   - The effect of b Intercept (Median = 19.98, 95% CI [6.72, 31.30]) has a 99.50%
#> probability of being positive (> 0), 99.50% of being significant (> 0.30), and
#> 99.00% of being large (> 1.81). The estimation successfully converged (Rhat =
#> 1.004) but the indices are unreliable (ESS = 434)
#>   - The effect of b qsec (Median = 0.92, 95% CI [0.35, 1.56]) has a 99.83%
#> probability of being positive (> 0), 98.00% of being significant (> 0.30), and
#> 0.50% of being large (> 1.81). The estimation successfully converged (Rhat =
#> 1.006) but the indices are unreliable (ESS = 542)
#>   - The effect of b wt (Median = -5.08, 95% CI [-6.02, -4.02]) has a 100.00%
#> probability of being negative (< 0), 100.00% of being significant (< -0.30),
#> and 100.00% of being large (< -1.81). The estimation successfully converged
#> (Rhat = 1.004) but the indices are unreliable (ESS = 377)
#> 
#> Following the Sequential Effect eXistence and sIgnificance Testing (SEXIT)
#> framework, we report the median of the posterior distribution and its 95% CI
#> (Highest Density Interval), along the probability of direction (pd), the
#> probability of significance and the probability of being large. The thresholds
#> beyond which the effect is considered as significant (i.e., non-negligible) and
#> large are |0.30| and |1.81| (corresponding respectively to 0.05 and 0.30 of the
#> outcome's SD). Convergence and stability of the Bayesian sampling has been
#> assessed using R-hat, which should be below 1.01 (Vehtari et al., 2019), and
#> Effective Sample Size (ESS), which should be greater than 1000 (Burkner, 2017).
summary(r)
#> We fitted a Bayesian linear model to predict mpg with qsec and wt. Priors over
#> parameters were set as student_t (location = 19.20, scale = 5.40)
#> distributions. The model's explanatory power is substantial (R2 = 0.82, adj. R2
#> = 0.79).  Within this model:
#> 
#>   - The effect of b Intercept (Median = 19.98, 95% CI [6.72, 31.30]) has 99.50%,
#> 99.50% and 99.00% probability of being positive (> 0), significant (> 0.30) and
#> large (> 1.81). The estimation successfully converged (Rhat = 1.004) but the
#> indices are unreliable (ESS = 434)
#>   - The effect of b qsec (Median = 0.92, 95% CI [0.35, 1.56]) has 99.83%, 98.00%
#> and 0.50% probability of being positive (> 0), significant (> 0.30) and large
#> (> 1.81). The estimation successfully converged (Rhat = 1.006) but the indices
#> are unreliable (ESS = 542)
#>   - The effect of b wt (Median = -5.08, 95% CI [-6.02, -4.02]) has 100.00%,
#> 100.00% and 100.00% probability of being negative (< 0), significant (< -0.30)
#> and large (< -1.81). The estimation successfully converged (Rhat = 1.004) but
#> the indices are unreliable (ESS = 377), We fitted a Bayesian linear model to
#> predict mpg with qsec and wt. Priors over parameters were set as uniform
#> (location = , scale = ) distributions. The model's explanatory power is
#> substantial (R2 = 0.82, adj. R2 = 0.79).  Within this model:
#> 
#>   - The effect of b Intercept (Median = 19.98, 95% CI [6.72, 31.30]) has 99.50%,
#> 99.50% and 99.00% probability of being positive (> 0), significant (> 0.30) and
#> large (> 1.81). The estimation successfully converged (Rhat = 1.004) but the
#> indices are unreliable (ESS = 434)
#>   - The effect of b qsec (Median = 0.92, 95% CI [0.35, 1.56]) has 99.83%, 98.00%
#> and 0.50% probability of being positive (> 0), significant (> 0.30) and large
#> (> 1.81). The estimation successfully converged (Rhat = 1.006) but the indices
#> are unreliable (ESS = 542)
#>   - The effect of b wt (Median = -5.08, 95% CI [-6.02, -4.02]) has 100.00%,
#> 100.00% and 100.00% probability of being negative (< 0), significant (< -0.30)
#> and large (< -1.81). The estimation successfully converged (Rhat = 1.004) but
#> the indices are unreliable (ESS = 377), We fitted a Bayesian linear model to
#> predict mpg with qsec and wt. Priors over parameters were set as uniform
#> (location = , scale = ) distributions. The model's explanatory power is
#> substantial (R2 = 0.82, adj. R2 = 0.79).  Within this model:
#> 
#>   - The effect of b Intercept (Median = 19.98, 95% CI [6.72, 31.30]) has 99.50%,
#> 99.50% and 99.00% probability of being positive (> 0), significant (> 0.30) and
#> large (> 1.81). The estimation successfully converged (Rhat = 1.004) but the
#> indices are unreliable (ESS = 434)
#>   - The effect of b qsec (Median = 0.92, 95% CI [0.35, 1.56]) has 99.83%, 98.00%
#> and 0.50% probability of being positive (> 0), significant (> 0.30) and large
#> (> 1.81). The estimation successfully converged (Rhat = 1.006) but the indices
#> are unreliable (ESS = 542)
#>   - The effect of b wt (Median = -5.08, 95% CI [-6.02, -4.02]) has 100.00%,
#> 100.00% and 100.00% probability of being negative (< 0), significant (< -0.30)
#> and large (< -1.81). The estimation successfully converged (Rhat = 1.004) but
#> the indices are unreliable (ESS = 377) and We fitted a Bayesian linear model to
#> predict mpg with qsec and wt. Priors over parameters were set as student_t
#> (location = 0.00, scale = 5.40) distributions. The model's explanatory power is
#> substantial (R2 = 0.82, adj. R2 = 0.79).  Within this model:
#> 
#>   - The effect of b Intercept (Median = 19.98, 95% CI [6.72, 31.30]) has 99.50%,
#> 99.50% and 99.00% probability of being positive (> 0), significant (> 0.30) and
#> large (> 1.81). The estimation successfully converged (Rhat = 1.004) but the
#> indices are unreliable (ESS = 434)
#>   - The effect of b qsec (Median = 0.92, 95% CI [0.35, 1.56]) has 99.83%, 98.00%
#> and 0.50% probability of being positive (> 0), significant (> 0.30) and large
#> (> 1.81). The estimation successfully converged (Rhat = 1.006) but the indices
#> are unreliable (ESS = 542)
#>   - The effect of b wt (Median = -5.08, 95% CI [-6.02, -4.02]) has 100.00%,
#> 100.00% and 100.00% probability of being negative (< 0), significant (< -0.30)
#> and large (< -1.81). The estimation successfully converged (Rhat = 1.004) but
#> the indices are unreliable (ESS = 377)
as.data.frame(r)
#> Parameter   |   Component | Median |         95% CI |     pd |  Rhat |    ESS |    Fit
#> --------------------------------------------------------------------------------------
#> (Intercept) | conditional |  19.98 | [ 6.72, 31.30] | 99.50% | 1.004 | 434.00 |       
#> qsec        | conditional |   0.92 | [ 0.35,  1.56] | 99.83% | 1.006 | 542.00 |       
#> wt          | conditional |  -5.08 | [-6.02, -4.02] |   100% | 1.004 | 377.00 |       
#> sigma       |       sigma |   2.66 | [ 2.10,  3.54] |   100% | 1.002 | 382.00 |       
#>             |             |        |                |        |       |        |       
#> ELPD        |             |        |                |        |       |        | -79.44
#> LOOIC       |             |        |                |        |       |        | 158.87
#> WAIC        |             |        |                |        |       |        | 158.59
#> R2          |             |        |                |        |       |        |   0.82
#> R2 (adj.)   |             |        |                |        |       |        |   0.78
#> Sigma       |             |        |                |        |       |        |   2.71
summary(as.data.frame(r))
#> Parameter   |   Component | Median |         95% CI |     pd |  Rhat |    ESS |  Fit
#> ------------------------------------------------------------------------------------
#> (Intercept) | conditional |  19.98 | [ 6.72, 31.30] | 99.50% | 1.004 | 434.00 |     
#> qsec        | conditional |   0.92 | [ 0.35,  1.56] | 99.83% | 1.006 | 542.00 |     
#> wt          | conditional |  -5.08 | [-6.02, -4.02] |   100% | 1.004 | 377.00 |     
#> sigma       |       sigma |   2.66 | [ 2.10,  3.54] |   100% | 1.002 | 382.00 |     
#>             |             |        |                |        |       |        |     
#> R2          |             |        |                |        |       |        | 0.82
#> R2 (adj.)   |             |        |                |        |       |        | 0.78
#> Sigma       |             |        |                |        |       |        | 2.71
# }