# 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)
node_plot(ge.Leontief$dstl[[1]])
ge.Leontief$p
## CES-type firm
dst.CES.firm <- Clone(dst.Leontief.firm)
node_set(dst.CES.firm, "cc1",
type = "SCES", a = NULL, alpha = 1, beta = c(0.6, 0.2),
es = 0 # es is the elasticity of substitution.
)
node_plot(dst.CES.firm)
dstl.CES <- list(dst.CES.firm, dst.household)
ge.CES <- gemMoney_3_2(dstl.CES)
node_plot(ge.CES$dstl[[1]])
node_plot(ge.CES$dstl[[2]])
ge.CES$p
p.money <- ge.CES$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
# }
Run the code above in your browser using DataLab