gemHeterogeneousFirms_2_3: Market Clearing Paths with Heterogeneous Firms

View source: R/gemHeterogeneousFirms_2_3.R

gemHeterogeneousFirms_2_3R Documentation

Market Clearing Paths with Heterogeneous Firms

Description

This is an example of market-clearing paths with heterogeneous firms.

Usage

gemHeterogeneousFirms_2_3(...)

Arguments

...

arguments to be passed to the function sdm2.

Examples


dst.firm1 <- node_new(
  "output",
  type = "CD", alpha = 1, beta = c(0.35, 0.65),
  "prod", "lab"
)

dst.firm2 <- node_new(
  "output",
  type = "CD", alpha = 1.3, beta = c(0.9, 0.1),
  "prod", "lab"
)

dst.consumer <- node_new(
  "util",
  type = "Leontief", a = 1,
  "prod"
)

ge <- sdm2(
  A = list(dst.firm1, dst.firm2, dst.consumer),
  B = matrix(c(
    1, 1, 0,
    0, 0, 0
  ), 2, 3, TRUE),
  S0Exg = matrix(c(
    NA, NA, NA,
    NA, NA, 100
  ), 2, 3, TRUE),
  names.commodity = c("prod", "lab"),
  names.agent = c("firm1", "firm2", "consumer"),
  numeraire = "lab",
  z0 = c(1, 1, 1),
  ts = TRUE,
  policy = policyMarketClearingPrice,
  numberOfPeriods = 200,
  maxIteration = 1
)

matplot(ge$ts.z, type = "l")


GE documentation built on Nov. 8, 2023, 9:07 a.m.