R/methods_base.R
, R/methods_brms.R
, R/methods_rstanarm.R
model_parameters.stanreg.Rd
Parameters from Bayesian models.
# S3 method for 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,
keep = NULL,
drop = NULL,
parameters = keep,
verbose = TRUE,
...
)
# S3 method for 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,
keep = NULL,
drop = NULL,
parameters = keep,
verbose = TRUE,
...
)
# S3 method for 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,
keep = NULL,
drop = NULL,
parameters = keep,
verbose = TRUE,
...
)
model  Bayesian model (including SEM from blavaan. May also be a data frame with posterior samples. 

centrality  The pointestimates (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. 
keep  Character containing a regular expression pattern
that describes the parameters that should be included in the returned data
frame (for 
drop  Character containing a regular expression pattern
that describes the parameters that should be included in the returned data
frame (for 
parameters  Deprecated, alias for 
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
logistic regression, or more generally speaking, for models with log
or logit links. Note: Deltamethod standard errors are also
computed (by multiplying the standard errors by the transformed
coefficients). This is to mimic behaviour of other software packages, such
as Stata, but these standard errors poorly estimate uncertainty for the
transformed coefficient. The transformed confidence interval more clearly
captures this uncertainty. 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
seepackage.
standardize_names()
to
rename columns into a consistent, standardized naming scheme.
if (FALSE) {
library(parameters)
if (require("rstanarm")) {
model < stan_glm(
Sepal.Length ~ Petal.Length * Species,
data = iris, iter = 500, refresh = 0
)
model_parameters(model)
}
}