Create and append a total tax row by summing selected tax rows in the primary inputs block (Quadrant III) of a SIOT or use table.
Usage
total_tax_add(
data_table,
tax_names = c("d21x31", "d29x39"),
total_tax_name = "TOTAL_TAX"
)Arguments
- data_table
A symmetric input–output table (SIOT) or use table whose primary inputs include tax rows (see Details). Typically obtained via
iotable_get().- tax_names
Character vector of row labels to sum. Defaults to
c("d21x31","d29x39"), shorthand for D.2–D.3 and D.29–D.39. Matching is currently made against the lower-cased key column.- total_tax_name
Character scalar for the new row label. Default
"TOTAL_TAX". (See Enhancements regarding case handling.)
Value
A data frame like data_table, with one additional row named
total_tax_name that equals the element-wise sum of the rows in
tax_names over numeric columns.
Details
In Eurostat/ESA terminology, tax rows commonly include:
Taxes less subsidies on products (codes D.2–D.3), and
Other net taxes on production (codes D.29–D.39).
These appear in the value-added (primary inputs) section of the use/SIOT
layout. The function sums the specified rows column-wise over all
numeric columns and appends the result as total_tax_name. If a household
final consumption column is present (e.g. final_consumption_households
or p3_s14), any missing value in the new total row is replaced by zero.
Terminology
Eurostat uses the lines “Taxes less subsidies on products” and “Other net taxes on production” in published tables; these correspond, respectively, to D.2–D.3 and D.29–D.39.
References
Eurostat (2008). Eurostat Manual of Supply, Use and Input–Output Tables, ch. 13. United Nations (2018). Handbook on Supply and Use Tables and Input–Output Tables with Extensions and Applications (Rev. 1, “white cover”), ch. 10.
See also
Other iotables processing functions:
conforming_vector_create(),
empty_remove(),
household_column_find(),
household_column_get(),
iotable_year_get(),
key_column_create(),
matrix_round(),
output_get(),
primary_input_get(),
rows_add(),
supplementary_add(),
vector_transpose_longer(),
vector_transpose_wider()
Examples
de_io <- iotable_get()
total_tax_add(
data_table = de_io,
tax_names = c("net_tax_products", "net_tax_production"),
total_tax_name = "total_tax"
)
#> iotables_row agriculture_group industry_group construction
#> 1 agriculture_group 1131 25480 1
#> 2 industry_group 7930 304584 64167
#> 3 construction 426 7334 3875
#> 4 trade_group 3559 72717 14190
#> 5 business_services_group 3637 96115 31027
#> 6 other_services_group 1552 14986 1747
#> 7 total 18235 521216 115007
#> 8 imports 2927 156703 13427
#> 9 intermediate_consumption 22246 684424 129982
#> 10 compensation_employees 9382 296464 78819
#> 11 net_tax_production -2012 1457 963
#> 12 consumption_fixed_capital 7871 63769 5860
#> 13 os_mixed_income_net 6423 33332 29982
#> 14 gva 21664 395022 115624
#> 15 output 43910 1079446 245606
#> 16 net_tax_products 1084 6505 1548
#> 17 employment_wage_salary 483 8032 2896
#> 18 employment_self_employed 613 349 340
#> 19 employment_domestic_total 1096 8381 3236
#> 20 total_tax -928 7962 2511
#> trade_group business_services_group other_services_group total
#> 1 607 710 762 28691
#> 2 41082 11981 30360 460104
#> 3 5296 23457 9155 49543
#> 4 74399 10835 21008 196708
#> 5 65755 193176 34223 423933
#> 6 11225 15058 22070 66638
#> 7 198364 255217 117578 1225617
#> 8 21943 13371 13772 222143
#> 9 228656 277061 143901 1486270
#> 10 214450 124810 272975 996900
#> 11 2748 5946 -8602 500
#> 12 41100 98610 49260 266470
#> 13 53109 186060 51384 360290
#> 14 311407 415426 365017 1624160
#> 15 540063 692487 508918 3110430
#> 16 8349 8473 12551 38510
#> 17 7977 3653 9555 32596
#> 18 1274 605 651 3832
#> 19 9251 4258 10206 36428
#> 20 11097 14419 3949 39010
#> final_consumption_households final_consumption_government inventory_change
#> 1 8500 16 -6
#> 2 197792 8588 7559
#> 3 3457 742 0
#> 4 269663 13492 0
#> 5 214757 10061 0
#> 6 119504 317251 0
#> 7 813673 350150 7553
#> 8 80187 2970 -4233
#> 9 1001060 356790 3580
#> 10 NA NA NA
#> 11 NA NA NA
#> 12 NA NA NA
#> 13 NA NA NA
#> 14 NA NA NA
#> 15 1001060 356790 3580
#> 16 107200 3670 260
#> 17 NA NA NA
#> 18 NA NA NA
#> 19 NA NA NA
#> 20 0 NA NA
#> gross_capital_formation exports total_final_use
#> 1 2975 3734 43910
#> 2 91692 313711 1079400
#> 3 191715 149 245606
#> 4 14155 46045 540063
#> 5 30124 13612 692487
#> 6 3483 2042 508918
#> 7 334144 379293 3110384
#> 8 41436 42597 385100
#> 9 404240 420730 3672624
#> 10 NA NA 996900
#> 11 NA NA 500
#> 12 NA NA 266470
#> 13 NA NA 360290
#> 14 NA NA 1624160
#> 15 404240 420730 NA
#> 16 28660 -1160 177140
#> 17 NA NA 32596
#> 18 NA NA 3832
#> 19 NA NA 36428
#> 20 NA NA 177640
