Skip to contents

Aggregates the IPCA components listed in ipca_classes_2020 (from January 2020) or ipca_classes_2012 (before that) with a weighted mean of their price changes, as described in Section 2.1 of BCB's Technical Note 57 (Dec/2025). Besides the exclusion cores, the EX3 Serviços and EX3 Industriais aggregates (formerly "serviços subjacente" and "industriais núcleo") can also be computed.

Usage

core_adhoc(core, data, change, weight, code, date)

Arguments

core

A string specifying the aggregate: "ex0", "ex1", "ex2", "ex3", "exfe", "ex3_servicos" or "ex3_industriais".

data

Dataframe object with inflation data (all hierarchy levels, as provided by get_ipca()).

change

A string with the column name of the percentage change of the inflation components.

weight

A string with the column name of the weight of the inflation components.

code

A string with the column name of the code of the inflation components as provided in get_ipca().

date

A string with the name of the date column.

Value

Calculated core inflation tibble.

Author

Fernando da Silva <fernando@fortietwo.com>

Examples

if (FALSE) { # \dontrun{
library(magrittr)
ipca_ex0 <- get_ipca(period = "all") %>%
core_adhoc("ex0", ., "pct_change", "weight", "code", "date")
} # }