# NOT RUN {
#### Leontief-type firm
interest.rate <- 0.25
dst.Leontief.firm <- node_new("output",
type = "FIN", rate = c(1, interest.rate),
"cc1", "money"
)
node_set(dst.Leontief.firm, "cc1",
type = "Leontief", a = c(0.6, 0.2),
"product", "labor"
)
dst.household <- node_new("utility",
type = "FIN", rate = c(1, interest.rate),
"product", "money"
)
dstl.Leontief <- list(dst.Leontief.firm, dst.household)
ge.Leontief <- gemMoney_3_2(dstl.Leontief)
ge.Leontief$p
## SCES-type firm
dst.SCES.firm <- Clone(dst.Leontief.firm)
node_set(dst.SCES.firm, "cc1",
type = "SCES", alpha = 1, beta = c(0.6, 0.2),
es = 0 # es is the elasticity of substitution.
)
node_plot(dst.SCES.firm)
dstl.SCES <- list(dst.SCES.firm, dst.household)
ge.SCES <- gemMoney_3_2(dstl.SCES)
ge.SCES$p
p.money <- ge.SCES$p
p.money["money"] <- p.money["money"] / interest.rate
p.money <- p.money / p.money["money"] # prices in terms of the asset price of the currency
p.money
## The price of money is the interest rate.
## The other prices are in terms of the asset price of the currency.
gemMoney_3_2(dstl.SCES,
numeraire = c("money" = interest.rate)
)
# }
Run the code above in your browser using DataLab