This function store the values in the environment and update
their values in the closed form expression of y
, except the parameter
sigma
. For parameter sigma
, its value will be updated, and the
corresponding value in e
will be updated.
Arguments
- prm_name
List or Vector. Parameter character names.
- prm_val
List or Vector. Parameter values.
Examples
# Instantiate
mod <- simple_cubic_model(a = -1, b = 1, sigma = 0.5)
mod
#>
#> ── <SIMPLE_CUBIC_MODEL object>
#> y = 1 + x + a * x^2 + b * x^3 + e
#> - x: <RAND_UNIFORM object>
#> [a: -1, b: 1]
#> - e: <RAND_NORMAL object>
#> [mu: 0, sigma: 0.5]
#> Parameters:
#> - a: -1
#> - b: 1
#> - sigma: 0.5
mod$set_prm("a", 2)
mod
#>
#> ── <SIMPLE_CUBIC_MODEL object>
#> y = 1 + x + a * x^2 + b * x^3 + e
#> - x: <RAND_UNIFORM object>
#> [a: -1, b: 1]
#> - e: <RAND_NORMAL object>
#> [mu: 0, sigma: 0.5]
#> Parameters:
#> - a: 2
#> - b: 1
#> - sigma: 0.5
mod$set_prm("sigma", 1)
mod
#>
#> ── <SIMPLE_CUBIC_MODEL object>
#> y = 1 + x + a * x^2 + b * x^3 + e
#> - x: <RAND_UNIFORM object>
#> [a: -1, b: 1]
#> - e: <RAND_NORMAL object>
#> [mu: 0, sigma: 1]
#> Parameters:
#> - a: 2
#> - b: 1
#> - sigma: 1