makePolicySupply {GE} | R Documentation |
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.
makePolicySupply(S, time.win = c(1, 1))
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. |
A policy function, which is often used as an argument of the function sdm2.
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)