Type: Package
Title: Core Inflation
Version: 0.1.0
Date: 2017-08-29
Maintainer: Pedro Costa Ferreira <pedro.guilherme@fgv.br>
Description: Provides access to core inflation functions. Four different core inflation functions are provided. The well known trimmed means, exclusion and double weighing methods, alongside the new Triple Filter method introduced in Ferreira et al. (2016) https://goo.gl/UYLhcj.
Depends: R (≥ 3.3.1)
License: BSD_3_clause + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.0.1
Imports: seasonal
Author: Pedro Costa Ferreira [aut, cre], Daiane Marcolino [aut], Talitha Speranza [aut], Fernando Teixeira [aut]
NeedsCompilation: no
BugReports: https://github.com/fernote7/Inflation/issues
URL: https://github.com/fernote7/Inflation
Suggests: covr
Packaged: 2017-08-31 18:06:09 UTC; fernando.teixeira
Repository: CRAN
Date/Publication: 2017-09-01 08:31:10 UTC

An R package providing tools for those who want to figure out the core inflation of their series.

Description

The Inflation package provides tools that allow its user to better understand core inflation.

The package provides a set of functions that compute the core inflation based on items that are part of an inflation index. Currently, the package allows for four different core inflation computations methods: trimmed means, exclusion, double weighting and triple filter. The first three are well known by the public. The latter is a method we developed that we believe is a better measure.

Note

The authors would like to thank the support by the Getulio Vargas Foundation (FGV) and make it clear that all data in the package is in public domain. We reaffirm that Inflation is mainly intended for academic usage.

Author(s)

Pedro Costa Ferreira pedro.guilherme@fgv.br, Talitha Speranza talitha.speranza@fgv.br, Fernando Teixeira fernando.teixeira@fgv.br, Daiane Marcolino daiane.mattos@fgv.br


Computes the double weighted core inflation

Description

Computes the double weighted core inflation

Usage

INFL.core_dw(infl.var, subits.var, weights, wind = 12)

Arguments

infl.var

A ts object. The inflation index variation.

subits.var

A ts. Subitems' variation.

weights

A ts. Weights corresponding to each subitem.

wind

An integer. The volatility's window size.

Value

A ts object.

Examples

ipca <- Inflation::ipca_item
nuc <- Inflation::INFL.core_dw(ipca$ipca_index, ipca$ipca_ts, ipca$weights_ts, wind = 12)

Computes the core inflation using the subitem exclusion method

Description

Computes the core inflation using the subitem exclusion method

Usage

INFL.core_ex(subits.var, weights, info, n.blocks = 4, alpha = 2)

Arguments

subits.var

A ts. Inflation subitems' variation.

weights

A ts. Each subitem corresponding weights. If missing, all items get the same weight.

info

A data.frame. Subitem metadata table containing their codes and descriptions.

n.blocks

An integer. Partitions' number inside the temporal window.

alpha

An integer. Significance level in percentage.

Examples

ipca <- Inflation::ipca_sub
ipc.ex1 <- Inflation::INFL.core_ex(subits.var = ipca$ipca_ts,
                                   weights = ipca$weights_ts,
                                   info = ipca$cod,
                                   n.blocks = 4,
                                   alpha = 2)


Computes the triple filter core inflation

Description

Computes the triple filter core inflation

Usage

INFL.core_tf(subits.var, weights, smoo, inf = 20, sup = 20, wind = 12,
  x11 = NULL, ...)

Arguments

subits.var

A ts. Subitems' variation.

weights

A ts. Each subitem corresponding weights. If missing, all items get the same weight.

smoo

A vector. List of codes to be smoothed. If missing, no item will be smoothed.

inf

An integer. Percentage lower tail cut. Predefined as 20.

sup

An integer. Percentage upper tail cut. Predefined as 20.

wind

An integer. The volatility's window size to be computed.

x11

A string. If an empty string is passed as argument, the seasonal adjustment uses x11 methodology.

...

arguments passed on to seas to compute the seasonal adjustment.

Value

A ts object.

Examples

ipca <- ipca_sub
INFL.core_tf(subits.var=ipca$ipca_ts, weights = ipca$weights_ts)




Computes the trimmed means core inflation

Description

Computes the trimmed means core inflation

Usage

INFL.core_tm(subits.var, weights, smoo, inf = 20, sup = 20, wind = 12)

Arguments

subits.var

A ts. Subitems' variation.

weights

A ts. Each subitem corresponding weights. If missing, all items get the same weight.

smoo

A vector. List of codes to be smoothed. If missing, no item will be smoothed.

inf

An integer. Percentage lower tail cut. Predefined as 20.

sup

An integer. Percentage upper tail cut. Predefined as 20.

wind

An integer. The volatility's window size.

Value

A list object. The list contains two time-series (ts objects). The computed core and the variables that were used to calculate the means.

Examples

ipca_sub <- Inflation::ipca_sub
nuc <- Inflation::INFL.core_tm(subits.var = ipca_sub$ipca_ts, weights = ipca_sub$weights_ts)

IPCA items and its weights

Description

A dataset containing the IPCA items, their respective weights and codes in tibble format. Items and codes are also provided in ts data structure.

Usage

ipca_item

Format

A list with five attributes:

ipca

dataframe with ipca items

weights

dataframe with weights items

ipca_ts

ts with ipca items

weights_ts

ts with weights items

cod

Items' codes

Source

https://sidra.ibge.gov.br


IPCA subitems and its weights

Description

A dataset containing the IPCA items, their respective weights and codes in tibble format. Subitems and codes are also provided in ts data structure.

Usage

ipca_sub

Format

A list with six attributes:

ipca

dataframe with ipca subitems

weights

dataframe with weights subitems

ipca_ts

ts with ipca subitems

weights_ts

ts with weights subitems

cod

Subitems' codes

ipca_index

The full index

Source

https://sidra.ibge.gov.br


Computes the volatility matrix

Description

!! DESCREVER O QUE É A MATRIZ

Usage

vol.mat(x, info, n.blocks, alpha)

Arguments

x

Subitems' variation.

info

Subitems' metadata.

n.blocks

Number of cuts to be made.

alpha

Significance level.