validate_prior: Validate User-Specified Prior for a Single Prior

View source: R/validate_prior_distributions.R

validate_priorR Documentation

Validate User-Specified Prior for a Single Prior

Description

Validates a single user-defined prior to ensure it specifies a valid distribution supported by Nimble and has the correct parameters for the distribution.

Usage

validate_prior(prior_name, prior_string)

Arguments

prior_name

A string representing the name of the prior (e.g., prior_mean).

prior_string

A string specifying the prior distribution (e.g., 'dnorm(0, 0.001)').

Value

Returns TRUE if the prior is valid. Throws an error if the prior is invalid.

Examples

validate_prior("prior_mean", "dnorm(0, 0.001)")


MultiNMix documentation built on April 3, 2025, 6:10 p.m.