makePolicySupply: Make a Policy of Supply

View source: R/makePolicySupply.R

makePolicySupplyR Documentation

Make a Policy of Supply

Description

Given a supply matrix and a time window vector, this function returns a policy function that sets the supply during this time window. By default, the time window of this function is c(1, 1), which means that this function will set the initial supply.

Usage

makePolicySupply(S, time.win = c(1, 1))

Arguments

S

a supply matrix.

time.win

the time window vector, i.e. a 2-vector specifying the start time and end time of policy implementation.

Value

A policy function, which is often used as an argument of the function sdm2.

See Also

sdm2

Examples


InitialEndowments <- {
  tmp <- matrix(0, 3, 2)
  tmp[1, 1] <- 0.01
  tmp[2, 2] <- tmp[3, 2] <- 1
  tmp
}

ge <- gemCanonicalDynamicMacroeconomic_3_2(
  policy.supply = makePolicySupply(InitialEndowments),
  policy.price = policyMarketClearingPrice,
  ts = TRUE,
  maxIteration = 1,
  numberOfPeriods = 50
)

par(mfrow = c(1, 2))
matplot(ge$ts.z, type = "o", pch = 20)
matplot(ge$ts.p, type = "o", pch = 20)



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

Related to makePolicySupply in GE...