Learn R Programming

report (version 0.1.0)

model_values.stanreg: Bayesian Models Values

Description

Extract all values of Bayesian models.

Usage

# S3 method for stanreg
model_values(model, ci = 0.9, ci_method = "default",
  standardize = FALSE, standardize_robust = FALSE, effsize = NULL,
  performance_in_table = TRUE, performance_metrics = c("R2",
  "R2_adjusted"), parameters_estimate = "median",
  parameters_test = c("pd", "rope"), parameters_diagnostic = TRUE,
  parameters_priors = TRUE, rope_range = "default", rope_full = TRUE,
  ...)

Arguments

model

Object of class lm.

ci

Credible Interval (CI) level. Default to 0.90 (90%).

ci_method

The type of index used for Credible Interval. Can be "default", hdi or "quantile" (see ci). Default selects "hdi" for linear models and "quantile" for models with binary outcome.

standardize

Standardized coefficients. See model_parameters.

effsize

Interpret the standardized parameters using a set of rules. Can be "cohen1988" (default for linear models), "chen2010" (default for logistic models), "sawilowsky2009", NULL, or a custom set of rules.

performance_in_table

Add performance metrics in table.

performance_metrics

Can be "all" or a list of metrics to be computed (some of c("LOO", "R2", "R2_adj")).

parameters_estimate

The point-estimate(s) to compute. Can be a character or a list with "median", "mean" or "MAP".

parameters_test

What indices of effect existence to compute. Can be a character or a list with "p_direction", "rope" or "p_map".

parameters_diagnostic

Include sampling diagnostic metrics (effective sample, Rhat and MCSE). Effective Sample should be as large as possible, altough for most applications, an effective sample size greater than 1,000 is sufficient for stable estimates (B<U+00FC>rkner, 2017). Rhat should not be larger than 1.1.

parameters_priors

Include priors specifications information. If set to true (current rstanarm' default), automatically adjusted priors' scale during fitting will be displayed.

rope_range

ROPE's lower and higher limits Should be a list of two values (e.g., c(-0.1, 0.1)) or "default". If "default", the bounds are set to x +- 0.1*SD(response).

rope_full

If TRUE, use the proportion of the entire posterior distribution for the equivalence test. Otherwise, use the proportion of HDI as indicated by the ci argument.

...

Arguments passed to or from other methods.