knitr::opts_chunk$set( collapse = TRUE, comment = "#>", warning = FALSE, message = FALSE, results = 'asis' ) knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file())
librarian::shelf('readxl','tidyverse','dplyover', 'tsibble', 'janitor', 'snakecase', 'magrittr', 'kableExtra', 'rmarkdown', 'magrittr','fim', 'gt', 'scales')
The FIM is defined as the actual contributions of real government purchases and real consumption to GDP less the contributions that would have prevailed if real purchases, real taxes, and real transfers were growing with potential GDP.
Define $G$ as nominal government purchases, $\pi_{G}$ as the inflation rate for government purchases, $C$ as nominal consumption, $C$ as nominal consumption, $T$ as nominal tax or transfer payments, $Y$ as nominal GDP, and $\mu$ as real potential output growth.
The contribution of real purchases to GDP is the growth rate of real government purchases times the share of government in GDP:
$$ \frac{G_t}{G_{t-1}} - \frac{G_{t-1}}{Y_{t-1}} \times (1 + \pi_{G} ) = \frac{G_t - G_{t-1} \times (1 + \pi_{G})}{Y_{t-1}} $$
In order to calculate the effects of government policy on the economy, it is necessary to specify a counterfactual; in other words, we need to know what the effects of a particular set of policies are compared to some alternative.
The counterfactual assumed by the FIM is that taxes and spending rise with potential GDP---the gross domestic output that would be obtained if the economy were at full employment.
$$ \mu \frac{G_{t-1}}{Y_{t-1}} $$
Thus, the FIM for purchases is defined as
$$ \text{FIM}{t}^{G} = \frac{G_t - G{t-1} \times \left(1 + \pi_G + \mu \right)}{Y_{t-1}} $$
Calculating the contribution of taxes and transfers to GDP requires translating taxes and transfer payments into dollars of consumption as well as specifying the counterfactual path for consumption due to taxes and transfer payments, which we do in manner analogous to that for purchases.
We assume that households' consumption responses to changes in taxes and transfers are slow and vary by the kind of payment. Thus in order to translate taxes and transfers into dollars of consumption, we apply the respective marginal propensities to consume (MPC) over the appropriate lags to each of the tax and transfer pieces. Let $j$ denote a kind of tax or transfer payment (for example, corporate taxes) and $i$ denote number of lags (in quarters). Then the consumption due to all tax or transfer payments $T$ in period $t$ is given by
$$ \sum_{j=1}^{3} \sum_{i=0}^{11} MPC_{j,t-i} T_{j,t-i} $$ Where $MPC_{j,t-i}$ is the appropriate MPC for tax or transfer payment $j$ at lag $i$. A table of assumed MPCs is provided in Table 1 below.
Analogous to the purchases, the counterfactual level of a tax or transfer payment of kind $j$ in quarter $t$ is given by
$$ \tilde{T}{j,t} = T{j,t-1}(1+\pi_{C}+ \mu) $$
Thus, the consumption due to taxes and transfer payments in excess of that which would be consistent with taxes and transfers growing with potential GDP can be written as
$$ T^C_{t} = \sum_{j=1}^{3} \sum_{i=0}^{11} MPC_{j,t-i} \left(T_{j,t-i} -\tilde{T}_{j,t-i}\right) $$ Stepping back, note that the contribution of real consumption to GDP is just the growth rate of real consumption times the share of consumption in GDP:
$$ \left(\frac{C_{t}}{C_{t-1}} - (1+\pi_{C})\right) \frac{C_{t-1}}{Y_{t-1}} $$
The fiscal impact of changes in taxes and transfers is measured as the difference between the realized contribution of consumption to real GDP growth and the contribution that would have occurred had the excess consumption $T^c_{t}$ not occurred. The FIM for taxes and transfers can then be written as
$$
FIM^T_{t} = \left(\frac{C_{t}}{C_{t-1}} - (1+\pi_{C})\right) \frac{C_{t-1}}{Y_{t-1}} - \left(\frac{C_{t} - T^C_{t}}{C_{t-1}} - (1+\pi_{C})\right) \frac{C_{t-1}}{Y_{t-1}}
$$
Which simplifies to:
$$ FIM^T_{t} = \frac{T^C_{t}}{Y_{t-1}} $$
Summing together the impacts of taxes, transfers, and purchases, we define the total FIM as
$$ FIM_{t} = \frac{G_{t} - (1+\pi_{G}+ \mu)G_{t-1} + T^C_{t}}{Y_{t-1}} $$
tab = data.frame( a = c(0.225,0.225,0,0,0.9), b = c(-0.12,-0.06,-0.06,0,-0.6), c = c(-0.033,-0.033,-0.033,-0.033,-0.4) ) tab = data.frame(t(tab)) rownames(tab) = c("Transfers", "Individual Taxes", "Corporate Taxes") tab knitr::kable(tab, "html", caption = "Assumed MPCs", booktabs = T,col.names = c("t thru t-1","t-2 thru t-3","t-4 thru t-7","t-8 thru t-11","Total MPC")) %>% add_header_above(c("Kind of Payment (j)", "Lag of MPC (i)" = 5), italic = T) %>% kableExtra::kable_styling(latex_options = "hold_position")
mpc <- tibble( Quarter = c(1:12, 'Total'), social_benefits = c(rep(0.23, 4), rep(0, 8), 0.9), rebate_checks = c(0.25, 0.11, rep(0.06, 10), 0.96), unemployment_insurance = c(rep(0.32, 2), rep(0.09, 2), rep(0.05, 2), rep(0, 6), 0.92), subsidies = c(0.05, rep(0.04, 7), rep(0.03, 4), 0.45), health_outlays = c(rep(0.1, 4), rep(0, 8), 0.4), noncorporate_taxes = -0.4*c(rep(1/12, 12), 0.4), corporate_taxes = noncorporate_taxes ) gt_tbl <- mpc %>% rename_with(.fn = ~ to_title_case(.), .cols = where(is.numeric)) %>% pivot_longer(-Quarter, names_to = 'Kind of payment') %>% mutate(Quarter = glue::glue('Q{Quarter}')) %>% pivot_wider(names_from = 'Quarter', values_from = 'value') %>% rename(Total = QTotal) %>% gt(rowname_col = 'kind of payment') gt_tbl %>% tab_row_group(rows = 6:7, group = 'Taxes') %>% gt::tab_row_group( rows = 1:5, group = 'Transfers' ) %>% cols_label(Total ='', `Kind of payment` = 'Kind of payment') %>% tab_spanner( label = "Lag", columns = paste0('Q', 1:12) ) %>% tab_spanner(label = 'Total', columns = 14) %>% fmt_percent(columns = 2:14, decimals = 1) %>% tab_header(title = md('**MPC Assumptions**')) %>% opt_all_caps() %>% opt_table_font( font = list( google_font("Roboto"), default_fonts() )) %>% tab_options( column_labels.border.top.width = px(5), column_labels.border.top.color = "transparent", table.border.top.color = "transparent", table.border.bottom.color = "transparent", data_row.padding = px(5), source_notes.font.size = 12, heading.align = "center", #Adjust grouped rows to make them stand out row_group.background.color = "#003A79")
Each quarter, BEA measures how much federal, state, and local governments spend on goods and services and reports what contribution those expenditures made to the headline GDP number (see Table 1.1.2 in the GDP release, for example). The FIM is related to this measure, but estimates instead the contribution that government policies are making to GDP beyond the contribution they would make if they were growing in line with the longer-run, potential path of the economy. Therefore, the FIM can be interpreted as a measure of how expansionary or contractionary fiscal policy is relative to the potential path of the economy.
In the BEA's National Income and Product Accounts (NIPA), government spending is attributed to the level of government that spends the money rather than to the level of government that finances the spending. To better attribute spending to the entity that made the policy decision, we reallocate to the federal government state and local spending that is financed by the federal government.
In particular, we use data on the federal share of Medicaid spending to split Medicaid expenditures into federal and state expenditures and to categorize the remainder of federal grants to states (i.e., for purposes other than Medicaid) as federal purchases.
Moreover, we spread out the \$150 billion Coronavirus Relief Fund established by the CARES Act to reflect our assumptions on when state & local governments will spend these funds.
Most of the data are from the the BEA's NIPA tables. Apart from the NIPA data, we use the Congressional Budget Office's (CBO) economic and budget projections to inform our forecasts.
to_table <- function(df) { df %>% rename_with(.fn = ~ to_title_case(.), .cols = where(is.numeric)) %>% pivot_longer(where(is.numeric), names_to = ' ') %>% pivot_wider(names_from = date, values_from = value) } nipa_projections <- readxl::read_xlsx('inst/extdata/nipa_projections.xlsx') add_factors <- readxl::read_xlsx('inst/extdata/LSFIM_KY_v7.xlsx', sheet = 'FIM Add Factors')
nipa <- nipa_projections %>% filter(date >= '2018-03-31' & date <= '2022-12-31') %>% left_join(add_factors %>% select(date, contains(c( 'purchases', 'grants' )))) %>% mutate(across(starts_with('add'), ~ coalesce(., 0))) %>% transmute( date = date, gross_domestic_product = gdp, federal_purchases = gf + add_federal_purchases, state_purchases = gs + add_state_purchases, consumption_grants_gross = gfeg, medicaid_grants = gfeghdx, consumption_grants_net = add_federal_cgrants + consumption_grants_gross - medicaid_grants, investment_grants = gfeigx, federal_purchases_deflator_growth = q_g(jgf), state_purchases_deflator_growth = q_g(jgs), consumption_grants_net_deflator_growth = q_g(jgse), investment_grants_deflator_growth = q_g(jgsi), real_potential_gdp_growth = q_g(gdppothq), federal_purchases_growth = gf_g, state_purchases_growth = gs_g, consumption_grants_gross_growth = gfeg_g, medicaid_grants_growth = gfeghhx_g, investment_grants_growth = gfeigx_g ) %>% mutate(date = yearquarter(date), across(where(is.numeric), ~ round(., digits = 2))) #paged_table(nipa %>% to_table()) nipa %>% to_table() %>% gt() %>% fmt_number(starts_with('20'), decimals =2)
The contribution of purchases consistent with the BEA's methodology is calculated as
$$ \frac{G_{i, t} - G_{i, t - 1} \times (1 + \pi_{i, t} ) }{Y_{t-1}} $$
$$\text{where }i = {\text{Federal purchases, state purchases, federal grants}}$$. We could compute this in R
as follows:
nipa %<>% mutate(over(c('federal_purchases', 'state_purchases', 'consumption_grants_net', 'investment_grants'), .fn = ~ 400 * (.("{.x}") - lag(.("{.x}")) * (1 + .("{.x}_deflator_growth"))) / lag(gross_domestic_product), .names = "{x}_contribution"))
nipa %<>% mutate( grants_contribution = consumption_grants_net_contribution + investment_grants_contribution )
nipa %>% mutate(across(where(is.numeric), ~ round(., digits = 2))) %>% select( date, federal_purchases_contribution, state_purchases_contribution, grants_contribution ) %>% filter(date > yearquarter('2018 Q2')) %>% to_table() %>% gt() %>% fmt_number(starts_with('20'), decimals =1)
The FIM's contributions differ slightly because we estimate the contribution of government policies to GDP relative to the contribution they would make if they were growing at the same rate as the potential path of the economy.
Recall that the FIM for purchases is defined as
$$FIM_{t}^{G} = \frac{G_t - G_{t-1} \times \left(1 + \pi_{G} + \mu \right)}{Y_{t-1}} $$
nipa %<>% mutate( over( c('federal_purchases', 'state_purchases', 'consumption_grants_net', 'investment_grants'), .fn = ~ 400 * (.("{.x}") - lag(.("{.x}")) * (1 + .("{.x}_deflator_growth") + real_potential_gdp_growth)) / lag(gross_domestic_product), .names = "{x}_contribution"))
Finally, we reallocate the contribution of federal grants to federal purchases and subtract them from the contribution of state purchases.
nipa %<>% mutate( grants_contribution = consumption_grants_net_contribution + investment_grants_contribution, federal_contribution = federal_purchases_contribution + grants_contribution, state_contribution = state_purchases_contribution - grants_contribution )
nipa %>% filter(date > yearquarter('2018 Q2')) %>% mutate(across(where(is.numeric), ~ round(., digits = 2))) %>% select(date, federal_contribution, state_contribution, grants_contribution) %>% to_table() %>% gt() %>% fmt_number(starts_with('20'), decimals =1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.