add_var_computer: Compute the non-primary variables

View source: R/HelperFunctions.R

add_var_computerR Documentation

Compute the non-primary variables

Description

This function computes additional secondary variables that are not computed in a models respective simulation functions. The simulation functions only compute the primary variables of a model such as L, K and Y in the Basic Solow Growth Model (BS).

Usage

add_var_computer(
  sim_data,
  add_vars,
  parameter_data,
  technology_variant,
  solowversion
)

Arguments

sim_data

The tibble that is being filled in the simulation function.

add_vars

Vector with the encoded variables that are secondary and need to be computed to make the simulation table complete.

parameter_data

The output from create_parameter_grid(...).

technology_variant

A string indicating the exogenous (technology_variant = "exo") or endogenous (technology_variant = "endo") nature of technology in the respective model. A special case (technology_variant = "special") stands for the technology form(s) of endogenous technology growth models (model code "ESEG").

solowversion

The model code for the model, such as "BS" or "ESSOE". (The same variables such as WR or RR are computed differently depending on the model.)

Note

See SimulateBasicSolowModel() for an example.


SebastianBehrens/SolowVariants documentation built on Oct. 11, 2023, 2:49 p.m.