Learn R Programming

GE (version 0.2.5)

makePolicyStickyPrice: Make a Policy of Sticky Price

Description

Given a stickiness value and a time window vector, this function returns a policy function that sets the current prices equal to the weighted mean of the market-clearing prices and the current prices during this time window. When the stickiness value is 0, the prices will be set to the market-clearing prices. When the stickiness value is 1, the current prices will keep unchanged.

Usage

makePolicyStickyPrice(stickiness = 0.5, time.win = c(1, Inf), tolCond = 1e-06)

Arguments

stickiness

a stickiness value between 0 and 1.

time.win

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

tolCond

the tolerance condition for computing the market-clearing price vector.

Value

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

See Also

sdm2

Examples

Run this code
# NOT RUN {
InitialEndowments <- {
  tmp <- matrix(0, 3, 2)
  tmp[1, 1] <- 0.01
  tmp[2, 2] <- tmp[3, 2] <- 1
  tmp
}

ge <- gemCanonicalDynamicMacroeconomic_3_2(
  priceAdjustmentFunction = function(p, q) p,
  policy.supply = makePolicySupply(InitialEndowments),
  policy.price = makePolicyStickyPrice(stickiness = 0.5),
  ts = TRUE,
  maxIteration = 1,
  numberOfPeriods = 50
)

par(mfrow = c(1, 2))
matplot(ge$ts.z, type = "b", pch = 20)
matplot(ge$ts.p, type = "b", pch = 20)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab