deflate {deflateBR} | R Documentation |
Deflate Nominal Brazilian Reais Using Various Price Indexes
Description
deflate()
uses data from the Brazilian Institute for Applied Economic Research's API (IPEADATA) to adjust nominal Brazilian Reais for inflation.
Usage
deflate(nominal_values, nominal_dates, real_date, index = c("ipca",
"igpm", "igpdi", "ipc", "inpc"))
Arguments
nominal_values |
A |
nominal_dates |
A |
real_date |
A value indicating the reference date to deflate nominal values in the format 'MM/YYYY' (e.g., '01/2018' for January 2018). |
index |
Indicates the price index used to deflate nominal Reais. Valid options are: |
Details
Each one of the five price indexes included in the function are maintained by two Brazilian agencies: IPCA and INPC indexes are maintained by Brazilian Institute of Geography and Statistics (IBGE); IGP-M, IGP-DI, and IPC are maintained by Getulio Vargas Foundation (FGV). For an overview of the indexes' methodologies and covered periods, check the Brazilian Central Bank official FAQ.
Value
A numeric
vector.
References
For more information on the Brazilian Institute for Applied Economic Research's API, please check (in Portuguese): http://www.ipeadata.gov.br/.
Examples
## Not run:
# Use IPCA index to deflate a vector of nominal Brazilian Reais
reais <- rep(100, 5)
actual_dates <- seq.Date(from = as.Date("2001-01-01"), to = as.Date("2001-05-01"), by = "month")
deflate(reais, actual_dates, "01/2018", "ipca")
# Using IGP-M index
deflate(reais, actual_dates, "01/2018", "igpm")
## End(Not run)