Description Usage Arguments Examples
View source: R/01-model-setup.R
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.
1 | validate_prior_distribution(prior, verbose = TRUE)
|
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). |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.