View source: R/HelperFunctions.R
create_parameter_grid | R Documentation |
Creates dataframe with np+1
rows and
length(names)
columns.
create_parameter_grid(names, ivs, pfcs, nvs, np)
names |
A vector with the names of the model-specific set of exogenously defined parameters. Refer to the vignette for the used names to the parameters. |
ivs |
Vector with intial values of the parameters. |
pfcs |
Vector with periods of paramter changes. |
nvs |
Vector with new paramter values from the respective period of paramter change onwards. |
np |
Integer indicating the number of periods for which the paramter-grid will be set up. |
The word "grid" refers to multiple parameter paths.
The term will be referenced throughout the simulation functions
as every model is defined via exogenously given parameters that will
be supplied and referenced as a 'parameter-grid' in the simulation functions.
**Warning**: Make sure you use the correct names in names
for the respective parameters. Use getRequiredParams(ModelCode)
to get them. The model abbreviations for ModelCode
(used consistently throughout the package) can be found in the vignette.
**Warning**: The inputs will be used to create the paramter paths. For each paramter, the same index will be used across all input vectors. That means that the first entry to ivs
will be the initial value to the parameter that is the first entry in the names
vector. Same applies the rest of the inputs to this function.
create_parameter_grid(getRequiredParams("BS"),
c(1, 1/3, 0.1, 0.02, 0.15),
c(NA, NA, NA, NA, NA),
c(NA, NA, NA, NA, NA),
10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.