Converts an amount between two years using GDP deflator data sourced from
the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Suitable
for adjusting GDP figures, government expenditure, and other macroeconomic
aggregates. For adjusting personal or consumer values (wages, prices of goods),
use adjust_inflation which uses CPI instead.
Arguments
- amount
Numeric (scalar or vector). The original monetary amount(s).
- from_year
Integer. The year the amount is from.
- currency
Character. A currency code or country name. Accepted codes:
"GBP","AUD","USD","EUR","CAD","JPY","CNY","CHF","NZD","INR","KRW","BRL","NOK". Country names are also accepted, e.g."Australia","United States","Japan","Switzerland"(case-insensitive).- to_year
Integer. The target year to adjust to. Defaults to the latest available year in the deflator series.
- round
Integer or
NULL. Number of decimal places to round to (default 2). UseNULLfor full precision.
Details
The GDP deflator measures price changes across all goods and services produced in an economy, unlike CPI which tracks a fixed consumer basket. Key differences from CPI:
Covers all domestic production, not just consumer goods
Excludes imported goods (CPI includes them)
Updates its basket automatically (CPI uses a fixed basket)
Published annually/quarterly (CPI is monthly)
Use the GDP deflator when comparing macroeconomic aggregates (GDP, government
spending, investment) across time. Use adjust_inflation for
personal or consumer values.
See also
Other GDP deflator adjustment:
historical_real()