# \donttest{
saving.rate <- 0.001
ratio.saving.consumption <- saving.rate / (1 - saving.rate)
dst.firm <- node_new(
"prod",
type = "CD", alpha = 5,
beta = c(1 / 6, 2 / 6, 3 / 6),
"lab", "prod", "land.use.rights"
)
dst.age1 <- node_new(
"util",
type = "FIN",
rate = c(1, ratio.saving.consumption),
"prod", "land.ownership"
)
dst.age2 <- node_new(
"util",
type = "Leontief", a = 1,
"prod"
)
ge <- sdm2(
A = list(
dst.firm, dst.age1, dst.age2
),
B = matrix(c(
1, 0, 0,
0, 0, 0,
0, 0, 0,
0, 0, 0
), 4, 3, TRUE),
S0Exg = matrix(c(
NA, NA, NA,
NA, 1, NA,
NA, NA, 1,
NA, NA, 1
), 4, 3, TRUE),
names.commodity = c("prod", "lab", "land.use.rights", "land.ownership"),
names.agent = c("firm", "age1", "age2"),
numeraire = "lab"
)
ge$p
ge$D
ge$DV
ge$S
ge$SV
## Change the saving-consumption ratio.
dst.age1$rate <- c(1, ratio.saving.consumption = 99)
ge <- sdm2(
A = list(
dst.firm, dst.age1, dst.age2
),
B = matrix(c(
1, 0, 0,
0, 0, 0,
0, 0, 0,
0, 0, 0
), 4, 3, TRUE),
S0Exg = matrix(c(
NA, NA, NA,
NA, 1, NA,
NA, NA, 1,
NA, NA, 1
), 4, 3, TRUE),
names.commodity = c("prod", "lab", "land.use.rights", "land.ownership"),
names.agent = c("firm", "age1", "age2"),
numeraire = "lab"
)
ge$p
ge$D
ge$DV
ge$S
ge$SV
# }
Run the code above in your browser using DataLab