sfcr_expand: Expand variables to implement sensitivity analysis

Description Usage Arguments Details Author(s) Examples

View source: R/sfcr_expand.R

Description

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.

Usage

1
sfcr_expand(x, variable, values)

Arguments

x

A external set created with sfcr_set() or a shock set created with sfcr_shock()

variable

the name of variable to be expanded.

values

a vector containing the new values of the external or shock variable.

Details

There are two available methods for the sfcr_expand() function:

Author(s)

João Macalós

Examples

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))

sfcr documentation built on Oct. 11, 2021, 9:09 a.m.