gdp_deflator: Calculate a gross domestic product (GDP) implicit price...

View source: R/pipeline-helpers.R

gdp_deflatorR Documentation

Calculate a gross domestic product (GDP) implicit price deflator between two years.

Description

The GDP deflator is a measure of price inflation with respect to a specific base year; it allows us to back out the effects of inflation when we compare prices over time. This function calculates a deflator given a base year (the year to convert from) and a conversion year (the year to convert to). To use the deflator, multiply prices in base-year dollars by the deflator; the result will be prices in the converted dollar year.

Usage

gdp_deflator(year, base_year)

Arguments

year

Year to convert TO.

base_year

Year to convert FROM.

Value

GDP Deflator. Multiply to convert FROM base_year dollars TO year dollars.

Author(s)

BBL

Source

U.S. Bureau of Economic Analysis, Gross domestic product (implicit price deflator) [A191RD3A086NBEA], retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/A191RD3A086NBEA, April 12, 2017

Examples

gdp_bil_1990USD <- c(4770, 4779, 4937)
gdp_bil_2010USD <- gdp_bil_1990USD * gdp_deflator(2010, base_year = 1990)

JGCRI/gcamdata documentation built on March 21, 2023, 2:19 a.m.