Return the names of available coefficients from a fitted model object.
This helps users discover which coefficient names can be passed to
coef_image or other extraction functions.
Usage
coef_names(x, ...)
# S3 method for class 'fmri_lm'
coef_names(x, type = c("estimates", "contrasts", "F", "all"), ...)See also
Other statistical_measures:
p_values(),
standard_error(),
stats()
Examples
# Create a small example
X <- matrix(rnorm(50 * 4), 50, 4)
edata <- data.frame(
condition = factor(c("A", "B", "A", "B")),
onsets = c(1, 12, 25, 38),
run = c(1, 1, 1, 1)
)
dset <- fmridataset::matrix_dataset(X, TR = 2, run_length = 50,
event_table = edata)
fit <- fmri_lm(onsets ~ hrf(condition), block = ~run, dataset = dset)
coef_names(fit)
#> [1] "condition_condition.A" "condition_condition.B"