coef.badp_model: Coefficients of a Single Model

View source: R/best_models.R

coef.badp_modelR Documentation

Coefficients of a Single Model

Description

Extracts the maximum likelihood estimates of one of the best models.

Usage

## S3 method for class 'badp_model'
coef(object, se = FALSE, include_absent = FALSE, digits = NULL, ...)

Arguments

object

An object of class badp_model, an element of the list returned by best_models.

se

Logical. If TRUE, a matrix with the estimates, their standard errors, robust standard errors and the corresponding p-values is returned instead of the estimates alone. The p-values are Wald p-values referred to the standard normal distribution.

include_absent

Logical. If FALSE (the default), parameters excluded from the model are dropped rather than returned as NA.

digits

Number of decimal places to round the result to. By default the values are returned exactly as estimated; supplying digits is a convenience for displaying them, equivalent to wrapping the call in round. The print and summary methods round to the number of digits given to best_models.

...

Additional arguments (currently unused).

Value

A named numeric vector, or a matrix when se = TRUE.

See Also

best_models, summary.badp_model

Examples

data(small_model_space)
best <- best_models(bma(small_model_space), best = 3)

coef(best[[1]])
coef(best[[1]], se = TRUE)
coef(best[[1]], se = TRUE, digits = 3)
coef(best[[1]], include_absent = TRUE)


badp documentation built on Sept. 15, 2026, 1:08 a.m.