VI_MODEL$set_prm | R Documentation |
This function store the values in the environment and update
their values in the closed form expression of y
. However, if the parameter
is not directly used by the closed form expression, user should override
this method to correctly set the parameter.
prm_name |
List or Vector. Parameter character names. |
prm_val |
List or Vector. Parameter values. |
Return the object itself.
# Instantiate
x <- rand_uniform()
e <- rand_normal()
test <- vi_model(prm = list(a = 1, x = x, e = e),
prm_type = list(a = "o", x = "r", e = "r"),
formula = y ~ 1 + a * x + x^2 + e,
null_formula = y ~ x,
alt_formula = y ~ x + I(x^2))
test
test$set_prm("a", 2)
test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.