Learn R Programming

godley

godley is an R package for simulating stock-flow consistent (SFC) macroeconomic models.

By employing godley, users can create fully fledged post-keynesian and MMT models of the economy to:

  • analyze the sensitivity of parameter changes,
  • impose policy or exogenous shocks,
  • visualize diverse dynamic macroeconomic scenarios, and
  • study the implications of various macroeconomic structures on key variables.

The package offers the flexibility to support both theoretical frameworks and data-driven scenarios.

It is named in honor of Wynne Godley (1926–2010), a prominent British post-Keynesian economist and a leading figure in SFC modeling.

Installation ⚙️

godley is currently hosted on GitHub github.com/gamrot/godley. To install the development version directly, please use devtools package:

install.packages("devtools")
devtools::install_github("gamrot/godley")

Example

Copy Link

Version

Install

install.packages('godley')

Monthly Downloads

229

Version

0.2.2

License

GPL (>= 3)

Maintainer

Elżbieta Jowik

Last Published

February 24th, 2025

Functions in godley (0.2.2)

prepare

Make initial matrix row for baseline scenario and prepare equations for simulate_scenario()
plot_cycles

Network plot of the model
restore_equation

Restore equation notation for warning messages
plot_simulation

Plot simulations of multiple variables in multiple scenarios
add_equation_single

Add single equation to the model
add_variable_single

Add single variable to the model
add_scenario

Add scenario to the model
add_equation

Add equations to the model
add_variable

Add variables to the model
create_sensitivity

Create model with sensitivity scenarios
add_shock

Add shock to shock object
create_model

Create SFC model object
check_parentheses_balance

Verify if parentheses in the equation are properly balanced
change_init

Change initial value of a variable
d

Calculate 1 order lag difference of a variable in model
create_shock

Create shock used in add_scenario().
simulate_scenario

Simulate scenario of SFC model object