# NOT RUN {
IT <- matrix(c(
30, 12, 9, 0, 0, 0, 0, 13,
15, 0, 0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0, 0, 0,
0, 9, 0, 0, 0, 2, 0, 0,
3, 0, 0, 1, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 0, 0,
8, 3, 3, 0, 0, 0, 0, 0,
0, 0, 0, 13, 150, 316, 258, 0,
0, 0, 0, 0, 288, 0, 0, 0,
0, 0, 0, 0, 92, 0, 0, 0,
0, 2, 0, 0, 0, 269, 0, 0,
0, 0, 0, 0, 35, 0, 0, 1,
0, 0, 0, 0, 172, 0, 0, 0,
0, 0, 0, 0, 1, 5, 13, 0
), 14, 8, TRUE)
OT <- matrix(c(
64, 0, 0, 0, 0, 0, 0, 0,
0, 15, 0, 0, 0, 0, 0, 0,
0, 2, 0, 0, 0, 0, 0, 0,
0, 0, 11, 0, 0, 0, 0, 0,
0, 3, 0, 0, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 0,
0, 0, 0, 13, 0, 0, 0, 0,
0, 0, 0, 0, 738, 0, 0, 0,
0, 0, 0, 0, 0, 288, 0, 0,
0, 0, 0, 0, 0, 92, 0, 0,
0, 0, 0, 0, 0, 0, 271, 0,
0, 0, 0, 0, 0, 36, 0, 0,
0, 0, 0, 0, 0, 172, 0, 0,
0, 0, 0, 0, 0, 0, 0, 14
), 14, 8, TRUE)
dimnames(IT) <- dimnames(OT) <- list(
c(
"product.CHN", "labor.CHN", "capital.CHN", "bond.CHN",
"tax.CHN", "dividend.CHN", "imported.product.CHN",
"product.ROW", "labor.ROW", "capital.ROW", "bond.ROW",
"tax.ROW", "dividend.ROW", "imported.product.ROW"
),
c(
"production.CHN", "consumption.CHN", "investment.CHN", "foreign.trade.CHN",
"production.ROW", "consumption.ROW", "investment.ROW", "foreign.trade.ROW"
)
)
ge <- gemInputOutputTable_2_7_4(IT, OT, return.dstl = TRUE)
ge$p
ge$z
node_plot(ge$dstl[[1]])
ge$dstl[[1]]$a
#### technology progress in CHN
OT.TP <- OT
OT.TP["product.CHN", "production.CHN"] <- OT["product.CHN", "production.CHN"] * 1.2
ge.TP <- gemInputOutputTable_2_7_4(IT, OT.TP, return.dstl = TRUE)
ge.TP$p
ge.TP$z
ge.TP$dstl[[1]]$a
#### capital accumulation in CHN
OT.CA <- OT
OT.CA["capital.CHN", "consumption.CHN"] <- OT["capital.CHN", "consumption.CHN"] * 2
ge.CA <- gemInputOutputTable_2_7_4(IT, OT.CA)
ge.CA$p
ge.CA$z
#### labor supply change in CHN
OT.LSC <- OT
OT.LSC["labor.CHN", "consumption.CHN"] <- OT["labor.CHN", "consumption.CHN"] * 0.5
ge.LSC <- gemInputOutputTable_2_7_4(IT, OT.LSC)
ge.LSC$p
ge.LSC$z
#### tariff rate change in CHN
IT.TRC <- IT
IT.TRC["tax.CHN","foreign.trade.CHN"] <- IT.TRC["tax.CHN","foreign.trade.CHN"] * 1.2
ge.TRC <- gemInputOutputTable_2_7_4(IT.TRC, OT)
ge.TRC$p
ge.TRC$z
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab