# NOT RUN {
## an exmaple of income tax (see Cardenete et al., 2012, Table 4.3)
dst.consumer1 <- node_new("utility",
type = "CD",
alpha = 1,
beta = c(0.3, 0.7),
"prod1", "prod2"
)
dst.consumer2 <- Clone(dst.consumer1)
dst.consumer2$beta <- c(0.6, 0.4)
dst.firm1 <- node_new("output",
type = "Leontief",
a = c(0.5, 0.2, 0.3),
"VA", "prod1", "prod2"
)
node_set(dst.firm1, "VA",
type = "CD",
alpha = 0.8^-0.8 * 0.2^-0.2,
beta = c(0.8, 0.2),
"lab", "cap"
)
dst.firm2 <- Clone(dst.firm1)
node_set(dst.firm2, "output",
a = c(0.25, 0.5, 0.25)
)
node_set(dst.firm2, "VA",
alpha = 0.4^-0.4 * 0.6^-0.6,
beta = c(0.4, 0.6)
)
dstl <- list(dst.firm1, dst.firm2, dst.consumer1, dst.consumer2)
ge <- sdm2(dstl,
names.commodity = c("prod1", "prod2", "lab", "cap"),
names.agent = c("firm1", "firm2", "consumer1", "consumer2"),
numeraire = "lab",
B = {
tmp <- matrix(0, 4, 4)
tmp[1, 1] <- 1
tmp[2, 2] <- 1
tmp
},
S0Exg = {
tmp <- matrix(NA, 4, 4)
tmp[3:4, 3] <- c(30, 20)
tmp[3:4, 4] <- c(20, 5)
tmp
},
maxIteration = 1,
policy = makePolicyIncomeTax(
agent = c(3, 4),
tax.rate = c(0.2, 0.2),
redistribution = c(0.5, 0.5)
)
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab