id_backend_available: Check Whether Models Can Be Estimated

View source: R/Backend.R

id_backend_availableR Documentation

Check Whether Models Can Be Estimated

Description

id_estimate() runs Stan with the 'cmdstanr' package, which needs a CmdStan installation, or with the 'stanr' package. Neither is on CRAN. This function says whether the backend that id_estimate() would use is installed, so that code can estimate models only when it is (the package's examples use it this way).

Usage

id_backend_available(backend = NULL)

Arguments

backend

"cmdstanr" or "stanr" to check that backend. If NULL (the default), the backend that id_estimate() uses when its backend argument isn't given: the option idealstan.backend if it is set, and otherwise 'cmdstanr' if it and CmdStan are installed and 'stanr' if not.

Value

TRUE if the backend is installed and can run models, FALSE if not.

Examples

id_backend_available()
id_backend_available("stanr")

idealstan documentation built on Dec. 2, 2026, 5:07 p.m.