is_bayesian_model: Checks if a model is a Bayesian model

View source: R/is_bayesian_model.R

is_bayesian_modelR Documentation

Checks if a model is a Bayesian model

Description

Small helper that checks if a model is a Bayesian model.

Usage

is_bayesian_model(x, exclude = NULL)

Arguments

x

A model object.

exclude

Optional character vector, indicating classes that should not be included in the check. E.g., exclude = "stanreg" would return FALSE for models from package rstanarm.

Value

A logical, TRUE if x is a Bayesian model.

Examples



library(rstanarm)
model <- stan_glm(Sepal.Width ~ Species * Petal.Length, data = iris)
is_bayesian_model(model)



insight documentation built on June 8, 2025, 11:23 a.m.