dst <- node_new("output",
type = "SCES", es = 0, alpha = 1, beta = c(0.5, 0.5),
"cc1", "cc2"
)
node_set(dst, "cc1",
type = "Leontief", a = c(0.6, 0.4),
"wheat", "iron"
)
node_set(dst, "cc2",
type = "SCES", sigma = -1, alpha = 1, beta = c(0.5, 0.5),
"labor", "capital"
)
node_plot(dst, TRUE)
p <- c(wheat = 1, iron = 3, labor = 2, capital = 4)
x <-demand_coefficient(dst, p)
output(dst, x)
output(dst, c(wheat = 3, iron = 3, labor = 3, capital = 3))
SCES(
es = 0, alpha = 1, beta = c(0.5, 0.5),
x = c(
min(3 / 0.6, 3 / 0.4),
SCES(es = 0.5, alpha = 1, beta = c(0.5, 0.5), x = c(3, 3))
)
)
Run the code above in your browser using DataLab