1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
#' @export
model_parameters.bamlss <- function(model,
centrality = "median",
dispersion = FALSE,
ci = 0.95,
ci_method = "eti",
test = "pd",
rope_range = "default",
rope_ci = 0.95,
component = "all",
exponentiate = FALSE,
standardize = NULL,
keep = NULL,
drop = NULL,
verbose = TRUE,
...) {
# Processing
params <- .extract_parameters_bayesian(
model,
centrality = centrality,
dispersion = dispersion,
ci = ci,
ci_method = ci_method,
test = test,
rope_range = rope_range,
rope_ci = rope_ci,
bf_prior = NULL,
diagnostic = NULL,
priors = FALSE,
effects = "all",
component = component,
standardize = standardize,
keep_parameters = keep,
drop_parameters = drop,
verbose = verbose,
...
)
params <- .add_pretty_names(params, model)
# exponentiate coefficients and SE/CI, if requested
params <- .exponentiate_parameters(params, model, exponentiate)
params <- .add_model_parameters_attributes(params,
model,
ci,
exponentiate,
ci_method = ci_method,
verbose = verbose,
...
)
attr(params, "parameter_info") <- insight::clean_parameters(model)
attr(params, "object_name") <- insight::safe_deparse_symbol(substitute(model))
class(params) <- unique(c("parameters_model", "see_parameters_model", class(params)))
params
}
#' @export
standard_error.bamlss <- function(model,
component = c("all", "conditional", "location", "distributional", "auxilliary"),
...) {
component <- match.arg(component)
params <- insight::get_parameters(model, component = component, ...)
.data_frame(
Parameter = colnames(params),
SE = unname(sapply(params, stats::sd, na.rm = TRUE))
)
}
#' @export
p_value.bamlss <- p_value.BFBayesFactor
|