validate_prior_distribution: Validate a specified prior distribution.

Description Usage Arguments Examples

View source: R/01-model-setup.R

Description

Pass in your control parameters, and this function will tell you whether you specified your priors correctly. It just checks supported_prior_distributions() for you; so also, see that function. You won't get a formal error if your prior is determined to be incorrectly specified; you'll get a message that tries to help you fix it.

Usage

1

Arguments

prior

The smooth_prior element of a control list as returned by cc_control().

verbose

Logical. Should the function actually print error messages? TRUE by default; turned off when used programatically (inside other functions).

Examples

1
2
3
4
5
6
7
mycontrol <- cc_control(smooth_prior = list(name = "pc.prec",params = c(u = 3,alpha = .5)))
mycontrol_missinginfo <- cc_control(smooth_prior = list(name = "pc.prec"))
mycontrol_badprior <- cc_control(smooth_prior = list(name = "foo"))

validate_prior_distribution(mycontrol)
validate_prior_distribution(mycontrol_missinginfo)
validate_prior_distribution(mycontrol_badprior)

awstringer1/casecrossover documentation built on March 11, 2021, 4:41 a.m.