R/inflation_adjust_cost.R
inflation_adjust_cost.Rd
Up to a present time inflated upwards.
inflation_adjust_cost(from_year, to_year, from_cost, inflation_data = 0.035)
from_year | Date of cost to convert from |
---|---|
to_year | Date to convert cost to |
from_cost | Cost at |
Inflated (to) cost (scalar), with attributes used to generate the return value:
from_year
to_year
from_cost
reference
Which inflation adjustment dataset used.
Option to use the following datasets:
ONS GDP_Deflators_Qtrly_National_Accounts (This document contains the latest gross domestic product (GDP) deflators. The GDP deflator can be viewed as a measure of general inflation in the domestic economy)
PSSRU annual inflation hospital and community health services (HCHS)
Fixed 3.5%.
$$(1 + i_{1})(1 + i_{2}) \cdots (1 + i_{n}) \times C$$
Clearly, for the same i
each year this is simply
$$C(1 + i)^n$$
from_year <- 2012 to_year <- 2015 from_cost <- 96.140 #100 inflation_adjust_cost(from_year = 2010, to_year = 2016, from_cost = 1)#> [1] 1.229255 #> attr(,"from_year") #> [1] 2010 #> attr(,"to_year") #> [1] 2016 #> attr(,"from_cost") #> [1] 1 #> attr(,"reference") #> [1] 0.035#1.229255 1*(1+0.035)^6#> [1] 1.229255inflation_adjust_cost(from_year = 2014, to_year = 2016, from_cost = 1, inflation_data = "CPI")#>#> [1] 1.01404 #> attr(,"from_year") #> [1] 2014 #> attr(,"to_year") #> [1] 2016 #> attr(,"from_cost") #> [1] 1 #> attr(,"reference") #> [1] "CPI"1*1.004*1.01#> [1] 1.01404