set_prior {isotracer} | R Documentation |
Set prior(s) for a network model
Description
Set prior(s) for a network model
Usage
set_prior(x, prior, param = "", use_regexp = TRUE, quiet = FALSE)
set_priors(x, prior, param = "", use_regexp = TRUE, quiet = FALSE)
Arguments
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 |
Value
A networkModel
object.
Examples
# 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)