View source: R/ui_model-building.R
set_prior | R Documentation |
Set prior(s) for a network model
set_prior(x, prior, param = "", use_regexp = TRUE, quiet = FALSE)
set_priors(x, prior, param = "", use_regexp = TRUE, quiet = FALSE)
x |
A |
prior |
A prior built with e.g. uniform_p() or hcauchy_p(). Call
|
param |
String, target parameter or regexp to target several
parameters. Default is the empty string |
use_regexp |
Boolean, if |
quiet |
Boolean, if |
A networkModel
object.
# Copy `aquarium_mod`
m <- aquarium_mod
priors(m)
# Modify the priors of `m`
m <- set_priors(m, exponential_p(0.5), "lambda")
priors(m)
# Re-apply priors from the original `aquarium_mod`
prev_priors <- priors(aquarium_mod)
prev_priors
m <- set_priors(m, prev_priors)
priors(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.