Parameters from Bayesian Models
Parameters from Bayesian models.
## S3 method for class 'data.frame'
model_parameters(
model,
centrality = "median",
dispersion = FALSE,
ci = 0.89,
ci_method = "hdi",
test = c("pd", "rope"),
rope_range = "default",
rope_ci = 1,
verbose = TRUE,
...
)
## S3 method for class 'brmsfit'
model_parameters(
model,
centrality = "median",
dispersion = FALSE,
ci = 0.89,
ci_method = "hdi",
test = c("pd", "rope"),
rope_range = "default",
rope_ci = 1,
bf_prior = NULL,
diagnostic = c("ESS", "Rhat"),
priors = FALSE,
effects = "fixed",
component = "all",
exponentiate = FALSE,
standardize = NULL,
group_level = FALSE,
verbose = TRUE,
...
)
## S3 method for class 'stanreg'
model_parameters(
model,
centrality = "median",
dispersion = FALSE,
ci = 0.89,
ci_method = "hdi",
test = c("pd", "rope"),
rope_range = "default",
rope_ci = 1,
bf_prior = NULL,
diagnostic = c("ESS", "Rhat"),
priors = TRUE,
effects = "fixed",
exponentiate = FALSE,
standardize = NULL,
group_level = FALSE,
verbose = TRUE,
...
)model |
Bayesian model (including SEM from blavaan. May also be a data frame with posterior samples. |
centrality |
The point-estimates (centrality indices) to compute. Character (vector) or list with one or more of these options: |
dispersion |
Logical, if |
ci |
Credible Interval (CI) level. Default to 0.89 (89%). See
|
ci_method |
The type of index used for Credible Interval. Can be
|
test |
The indices of effect existence to compute. Character (vector) or
list with one or more of these options: |
rope_range |
ROPE's lower and higher bounds. Should be a list of two
values (e.g., |
rope_ci |
The Credible Interval (CI) probability, corresponding to the proportion of HDI, to use for the percentage in ROPE. |
verbose |
Toggle messages and warnings. |
... |
Currently not used. |
bf_prior |
Distribution representing a prior for the computation of Bayes factors / SI. Used if the input is a posterior, otherwise (in the case of models) ignored. |
diagnostic |
Diagnostic metrics to compute. Character (vector) or list with one or more of these options: |
priors |
Add the prior used for each parameter. |
effects |
Should results for fixed effects, random effects or both be returned? Only applies to mixed models. May be abbreviated. |
component |
Model component for which parameters should be shown. May be
one of |
exponentiate |
Logical, indicating whether or not to exponentiate the
the coefficients (and related confidence intervals). This is typical for,
say, logistic regressions, or more generally speaking: for models with log
or logit link. Note: standard errors are also transformed (by
multiplying the standard errors with the exponentiated coefficients), to
mimic behaviour of other software packages, such as Stata. For
|
standardize |
The method used for standardizing the parameters. Can be
|
group_level |
Logical, for multilevel models (i.e. models with random
effects) and when |
A data frame of indices related to the model's parameters.
When standardize = "refit", columns diagnostic,
bf_prior and priors refer to the original
model. If model is a data frame, arguments diagnostic,
bf_prior and priors are ignored.
There is also a
plot()-method
implemented in the
see-package.
standardize_names() to
rename columns into a consistent, standardized naming scheme.
## Not run:
library(parameters)
if (require("rstanarm")) {
model <- stan_glm(
Sepal.Length ~ Petal.Length * Species,
data = iris, iter = 500, refresh = 0
)
model_parameters(model)
}
## End(Not run)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.