# \donttest{
#### turnover tax
dst.firm <- node_new("prod",
type = "FIN",
rate = c(1, tax.rate = 0.25),
"cc1", "tax"
)
node_set(dst.firm, "cc1",
type = "CD",
alpha = 2, beta = c(0.5, 0.5),
"prod", "lab"
)
dst.laborer <- dst.government <-
node_new("util",
type = "Leontief",
a = 1,
"prod"
)
ge.TT <- sdm2(
A = list(dst.firm, dst.laborer, dst.government),
B = diag(c(1, 0, 0)),
S0Exg = {
S0Exg <- matrix(NA, 3, 3)
S0Exg[2, 2] <- 100
S0Exg[3, 3] <- 100
S0Exg
},
names.commodity = c("prod", "lab", "tax"),
names.agent = c("firm", "laborer", "government"),
numeraire = "prod"
)
ge.TT$p
ge.TT$z
ge.TT$D
ge.TT$S
#### product tax
dst.taxed.prod <- node_new("taxed.prod",
type = "FIN",
rate = c(1, tax.rate = 0.25),
"prod", "tax"
)
dst.firm <- node_new("prod",
type = "CD",
alpha = 2, beta = c(0.5, 0.5),
dst.taxed.prod, "lab"
)
dst.laborer <- dst.government <-
node_new("util",
type = "Leontief",
a = 1,
dst.taxed.prod
)
ge.PT <- sdm2(
A = list(dst.firm, dst.laborer, dst.government),
B = diag(c(1, 0, 0)),
S0Exg = {
S0Exg <- matrix(NA, 3, 3)
S0Exg[2, 2] <- 100
S0Exg[3, 3] <- 100
S0Exg
},
names.commodity = c("prod", "lab", "tax"),
names.agent = c("firm", "laborer", "government"),
numeraire = "prod"
)
ge.PT$p
ge.PT$z
ge.PT$D
ge.PT$S
#### consumption tax
dst.firm <- node_new("output",
type = "CD", alpha = 2,
beta = c(0.5, 0.5),
"prod", "lab"
)
dst.laborer <- node_new("util",
type = "FIN",
rate = c(1, consumption.tax.rate = 1/3),
"prod", "tax"
)
dst.government <- node_new("utility",
type = "Leontief",
a = 1,
"prod"
)
ge.CT <- sdm2(
A = list(dst.firm, dst.laborer, dst.government),
B = diag(c(1, 0, 0)),
S0Exg = {
S0Exg <- matrix(NA, 3, 3)
S0Exg[2, 2] <- 100
S0Exg[3, 3] <- 100
S0Exg
},
names.commodity = c("prod", "lab", "tax"),
names.agent = c("firm", "laborer", "government"),
numeraire = "prod"
)
ge.CT$p
ge.CT$z
ge.CT$D
ge.CT$S
#### value added tax
dst.firm <- node_new("output",
type = "CD", alpha = 2,
beta = c(0.5, 0.5),
"prod", "taxed.lab"
)
node_set(dst.firm, "taxed.lab",
type = "FIN",
rate = c(1, vat.rate = 1/3),
"lab", "tax"
)
dst.laborer <- dst.government <-
node_new("util",
type = "Leontief",
a = 1,
"prod"
)
ge.VAT <- sdm2(
A = list(dst.firm, dst.laborer, dst.government),
B = diag(c(1, 0, 0)),
S0Exg = {
S0Exg <- matrix(NA, 3, 3)
S0Exg[2, 2] <- S0Exg[3, 3] <- 100
S0Exg
},
names.commodity = c("prod", "lab", "tax"),
names.agent = c("firm", "laborer", "government"),
numeraire = "prod"
)
ge.VAT$p
ge.VAT$z
ge.VAT$D
ge.VAT$S
#### income tax
income.tax.rate <- 1 / 4
dst.firm <- node_new("output",
type = "CD",
alpha = 2, beta = c(0.5, 0.5),
"prod", "lab"
)
dst.laborer <- dst.government <-
node_new("util",
type = "Leontief",
a = 1,
"prod"
)
ge.IT <- sdm2(
A = list(dst.firm, dst.laborer, dst.government),
B = diag(c(1, 0),2,3),
S0Exg = {
S0Exg <- matrix(NA, 2, 3)
S0Exg[2, 2] <- 100 * (1 - income.tax.rate)
S0Exg[2, 3] <- 100 * income.tax.rate
S0Exg
},
names.commodity = c("prod", "lab"),
names.agent = c("firm", "laborer", "government"),
numeraire = "prod"
)
ge.IT$p
ge.IT$z
ge.IT$D
ge.IT$S
#### turnover tax (Li, 2019, example 4.11)
dst.firm <- node_new("output",
type = "FIN",
rate = c(1, turnover.tax.rate = 1),
"cc1", "tax"
)
node_set(dst.firm, "cc1",
type = "CD",
alpha = 1, beta = c(0.5, 0.5),
"prod", "lab"
)
dst.laborer1 <- node_new("util",
type = "CD",
alpha = 1, beta = c(0.5, 0.5),
"prod", "lab"
)
dst.laborer2 <- node_new("utility",
type = "Leontief",
a = 1,
"prod"
)
ge.TT2 <- sdm2(
A = list(dst.firm, dst.laborer1, dst.laborer2),
B = diag(c(1, 0, 0)),
S0Exg = {
S0Exg <- matrix(NA, 3, 3)
S0Exg[2, 2] <- S0Exg[2, 3] <-
S0Exg[3, 3] <- 100
S0Exg
},
names.commodity = c("prod", "lab", "tax"),
names.agent = c("firm", "laborer1", "laborer2"),
numeraire = "lab"
)
ge.TT2$p
ge.TT2$z
# }
Run the code above in your browser using DataLab