Description Usage Arguments Details Author(s) Examples
The sfcr_expand()
function is a s3 generic that takes
a list of external objects and returns a expanded set of these lists.
It has methods for sfcr_set
objects and for sfcr_shock
objects.
1 | sfcr_expand(x, variable, values)
|
x |
A external set created with |
variable |
the name of variable to be expanded. |
values |
a vector containing the new values of the external or shock variable. |
There are two available methods for the sfcr_expand()
function:
sfcr_set
:
Takes a sfcr_set
object with external variables and creates
a list of sets that inherits all the aspects of the x
set supplied
but set the values of the variable
to the each element of value
.
The output is a sfcr_mlt_set
object.
sfcr_shock
:
Takes a sfcr_shock
object and creates a list of shocks that inherits
all the aspects of the x
shock but set the values
of the
variable
to each element of value
. The output of this
method is a sfcr_mlt_shock
object.
João Macalós
1 2 3 4 5 6 7 | # 1. Expand a external set:
external <- sfcr_set(G_d ~ 20, W ~ 1, alpha1 ~ 0.6, alpha2 ~ 0.4, theta ~ 0.2)
sfcr_expand(external, alpha2, c(0.1, 0.2))
# 2. Expand a shock:
shock <- sfcr_shock(variables = sfcr_set(alpha1 ~ 0.8), start = 5, end = 50)
sfcr_expand(shock, alpha1, c(0.7, 0.8, 0.9))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.