Partition: BEA Make-Use
The first step in the build stream involves partitioning BEA supply/use data into parameters by filtering this data based on sectors and goods. Generally, BEA input (i
) maps to goods (g
), and BEA output (j
) maps to sectors (s
).
SLiDE.partition_bea
— Functionpartition_bea(dataset::Dataset, d::Dict, set::Dict; kwargs...)
Arguments
dataset::Dataset
identifierd::Dict
of model parametersset::Dict
of Arrays describing parameter indices (years, regions, goods, sectors, etc.)
Returns
d::Dict
of model parametersset::Dict
of Arrays describing parameter indices (years, regions, goods, sectors, etc.)
SLiDE._partition_io!
— Functionys0(yr,s,g)
, sectoral supply (with byproducts), and id0(yr,g,s)
, intermediate input demand
Filter from supply/use data:
\[\begin{aligned} \tilde{id}_{yr,s,} = \left\{{use}\left(yr,i,j\right) \;\vert\; yr,\, g \in i,\, s \in j \right\} \\ \tilde{ys}_{yr,s,g} = \left\{{supply}\left(yr,j,i\right) \;\vert\; yr,\, s \in j,\, g \in i \right\} \end{aligned}\]
Treat negative inputs as outputs:
\[\begin{aligned} \tilde{ys}_{yr,s,g} &= \tilde{ys}_{yr,s,g} - \min\left\{0, \tilde{id}_{yr,g,s} \right\} \\ \tilde{id}_{yr,g,s} &= \max\left\{ 0, \tilde{id}_{yr,s,g} \right\} \end{aligned}\]
Use
SLiDE._partition_ts0!
— Functionts(yr,ts,s)
, taxes and subsidies
\[\tilde{ts}_{yr,ts,s} = \left\{{use}\left(yr,i,j\right) \;\vert\; yr,\, ts \in i,\, s \in j \right\}\]
Treat negative inputs as outputs:
\[\tilde{ts}_{yr,ts,s} = - \tilde{ts}_{yr,ts,s} \;\forall\; ts = subsidies\]
SLiDE._partition_va0!
— Functionva(yr,va,s)
, value added
\[\tilde{va}_{yr,va,s} = \left\{{use}\left(yr,i,j\right) \;\vert\; yr,\, va \in i,\, s \in j \right\}\]
SLiDE._partition_x0!
— Functionx(yr,g)
, exports of goods and services
\[\tilde{x}_{yr,g} = \left\{{use}\left(yr,i,j\right) \;\vert\; yr,\, g \in i,\, exports \in j \right\}\]
SLiDE._partition_fd!
— Functionfd(yr,g,fd)
, final demand, and fs(yr,g)
, household supply
\[\begin{aligned} \tilde{fd}_{yr,g,fd} &= \left\{{use}\left(yr,i,j\right) \;\vert\; yr,\, g \in i,\, fd \in j \right\} \\ \tilde{fs}_{yr,g} &= \left\{\tilde{fd}_{yr,g,fd} \;\vert\; yr,\, g \in i,\, fd = pce \right\} \end{aligned}\]
\[\begin{aligned} \tilde{fs}_{yr,g} &= - \min\left\{0, \tilde{fs}_{yr,g} \right\} \\ \tilde{fd}_{yr,g,fd} &= \max\left\{0, \tilde{fd}_{yr,g,fd} \right\} \end{aligned}\]
Calculate aggregates
SLiDE._partition_s0!
— Functions(yr,s)
, aggregate supply
\[\tilde{s}_{yr,s} = \sum_{g}\tilde{ys}_{yr,s,g}\]
SLiDE._partition_a0!
— Functiona(yr,g)
, Armington supply
\[\tilde{a}_{yr,g} = \sum_{fd}\tilde{fd}_{yr,g,fd} + \sum_{s}\tilde{id}_{yr,g,s}\]
Supply
Make insurance adjustments.
SLiDE._partition_cif0!
— Functioncif(yr,g)
, CIF/FOB Adjustments on Imports
\[\tilde{cif}_{yr,g} = \left\{{supply}\left(yr,i,j\right) \;\vert\; yr,\, g \in i,\, j = ciffob \right\}\]
SLiDE._partition_m0!
— Functionm(yr,g)
, imports
\[\tilde{m}_{yr,g} = \left\{{supply}\left(yr,i,j\right) \;\vert\; yr,\, g \in i,\, j = imports \right\}\]
Adjust transport margins according to CIF/FOB adjustments:
\[\tilde{m}_{yr,g} = \tilde{m}_{yr,g} + \tilde{cif}_{yr,g} \;\forall\; g = ins\]
SLiDE._partition_trn0!
— Functiontrn(yr,g)
, transportation costs
\[\tilde{trn}_{yr,g} = \left\{{supply}\left(yr,i,j\right) \;\vert\; yr,\, g \in i,\, j = trncost \right\}\]
\[\tilde{trn}_{yr,g} = \tilde{m}_{yr,g} + \tilde{cif}_{yr,g} \;\forall\; g \neq ins\]
Calculate margin supply and demand.
SLiDE._partition_mrg0!
— Functionmrg(yr,g)
, trade margins
\[\tilde{mrg}_{yr,g} = \left\{{supply}\left(yr,i,j\right) \;\vert\; yr,\, g \in i,\, j = margins \right\}\]
SLiDE._partition_md0!
— Functionmd(yr,m,g)
, margin demand
\[\begin{aligned} \tilde{md}_{yr,m,g} &= \begin{cases} \tilde{mrg}_{yr,g} & m = trd \\ \tilde{trn}_{yr,g} & m = trn \end{cases} \\ \tilde{md}_{yr,m,g} &= \max\left\{0, \tilde{md}_{yr,m,g} \right\} \end{aligned}\]
SLiDE._partition_ms0!
— Functionms(yr,g,m)
, margin supply
\[\begin{aligned} \tilde{ms}_{yr,g,m} &= \begin{cases} \tilde{mrg}_{yr,g} & m = trd \\ \tilde{trn}_{yr,g} & m = trn \end{cases} \\ \tilde{ms}_{yr,g,m} &= \max\left\{0, -\tilde{ms}_{yr,g,m} \right\} \end{aligned}\]
SLiDE._partition_y0!
— Functiony(yr,g)
, gross output "Move household supply of recycled goods into the domestic output market from which some may be exported. Net out margin supply from output."
\[\tilde{y}_{yr,g} = \sum_{s}\tilde{ys}_{yr,s,g} + \tilde{fd}_{yr,g} - \sum_{m}\tilde{ms}_{yr,g,m}\]
Calculate import tariffs.
SLiDE._partition_tax0!
— Functiontax(yr,g)
, taxes on products
\[\tilde{tax}_{yr,g} = \left\{{supply}\left(yr,i,j\right) \;\vert\; yr,\, g \in i,\, j = tax \right\}\]
SLiDE._partition_sbd0!
— Functionsbd(yr,g)
, subsidies on products
\[\tilde{sbd}_{yr,g} = \left\{{supply}\left(yr,i,j\right) \;\vert\; yr,\, g \in i,\, j = subsidies \right\}\]
Treat negative inputs as outputs:
\[\tilde{sbd}_{yr,g} = - \tilde{sbd}_{yr,g}\]
SLiDE._partition_ta0!
— Functionta(yr,g)
, import tariff
\[\tilde{ta}_{yr,g} = \frac{\tilde{tax}_{yr,g} - \tilde{sbd}_{yr,g}}{\tilde{a}_{yr,g}}\]
Calculate tax rate on intermediate demand.
SLiDE._partition_duty0!
— Functionduty(yr,g)
, import duties
\[\tilde{duty}_{yr,g} = \left\{{supply}\left(yr,i,j\right) \;\vert\; yr,\, g \in i,\, j = duties \right\}\]
SLiDE._partition_tm0!
— Functiontm(yr,g)
, tax net subsidy rate on intermediate demand
\[\tilde{tm}_{yr,g} = \frac{\tilde{duty}_{yr,g}}{\tilde{m}_{yr,g}}\]
SLiDE._partition_bop!
— Functionbopdef(yr)
, balance of payments
\[\tilde{bop}_{yr} = 0 \;\forall\; yr\]