is_bayesian_model {insight}R 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)



[Package insight version 1.3.0 Index]