Learn R Programming

MultiNMix (version 0.1.0)

validate_prior: 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)

Value

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

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)').

Examples

Run this code
validate_prior("prior_mean", "dnorm(0, 0.001)")

Run the code above in your browser using DataLab