Skip to contents

Same five steps as core_ma() (Section 2.4 of BCB's Technical Note 57), but nine items with infrequent price adjustments have their monthly change replaced by the geometric mean of their last 12 monthly changes before trimming: 2201 Combustíveis (domésticos), 2202 Energia elétrica residencial, 5101 Transporte público, 5104 Combustíveis (veículos), 7101 Serviços pessoais, 7202 Fumo, 8101 Cursos regulares, 8104 Cursos diversos and 9101 Comunicação (see smoothed in ipca_classes_2020).

Usage

core_ms(data, change, weight, code, date)

Arguments

data

Dataframe object with inflation items data.

change

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

weight

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

code

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

date

A string with the name of the date column.

Value

Calculated core inflation tibble.

Details

Months in which any smoothed item lacks a 12-month history are dropped, so the series starts 11 months after the first observation in data. Pass data from both SIDRA tables (1419 and 7060) to cover the first months of 2020.

Author

Fernando da Silva <fernando@fortietwo.com>

Examples

if (FALSE) { # \dontrun{
library(magrittr)
library(dplyr)

ipca_ms <- get_ipca(period = "all") %>%
group_desc() %>%
dplyr::filter(group == "Item") %>%
core_ms(., "pct_change", "weight", "code", "date")
} # }