cpi_inflator: CPI inflator

Description Usage Arguments Value Examples

View source: R/cpi_inflator.R

Description

CPI inflator

Usage

1
2
3
4
cpi_inflator(from_nominal_price = 1, from_fy = NULL, to_fy = NULL,
  adjustment = c("seasonal", "none", "trimmed.mean"),
  useABSConnection = FALSE, allow.projection = TRUE,
  accelerate.above = 100000L)

Arguments

from_nominal_price

(numeric) the price (or vector of prices) to be inflated

from_fy, to_fy

(character) a character vector with each element in the form "2012-13" representing the financial years between which the CPI inflator is desired.

If both from_fy and to_fy are NULL (the default), from_fy is set to the previous financial year and to_fy to the current financial year, with a warning. Setting only one is an error.

adjustment

What CPI index to use ("none" = raw series, "seasonal", or "trimmed" [mean]).

useABSConnection

Should the function connect with ABS.Stat via an SDMX connection? If FALSE (the default), a pre-prepared index table is used. This is much faster and more reliable (in terms of errors), though of course relies on the package maintainer to keep the tables up-to-date. The internal data was updated on 2018-08-17 to 2018-Q2. If using useABSConnection = TRUE, ensure you have rsdmx (>= 0.5-10) up-to-date.

allow.projection

Should projections beyond the ABS's data be allowed?

accelerate.above

An integer setting the threshold for 'acceleration'. When the maximum length of the arguments exceeds this value, calculate each unique value individually then combine. Set to 100,000 as a rule of thumb beyond which calculation speeds benefit dramatically. Can be set to Inf to disable acceleration.

Value

The value of from_nominal_price in real (to_fy) dollars.

Examples

1
cpi_inflator(100, from_fy = "2005-06", to_fy = "2014-15")

grattan documentation built on Oct. 17, 2018, 1:05 a.m.