Skip to contents

Changes the reference year of a chain-linked series (with annual overlap).

Usage

change_ref_year(x, new_ref_year)

Arguments

x

(ts) A chain-linked series with annual overlap.

new_ref_year

(num) New reference year.

Value

The re-referenced index series.

Examples

change_ref_year(gdp_volume, 2015)
#>           Qtr1      Qtr2      Qtr3      Qtr4
#> 1995  63.45124  67.50745  65.27715  70.10817
#> 1996  64.96059  68.94137  67.31702  72.06976
#> 1997  66.63565  71.22110  69.78353  75.45228
#> 1998  69.93211  74.31670  72.84880  78.17332
#> 1999  72.96854  77.63020  76.25368  81.43670
#> 2000  77.34495  81.86492  79.95433  85.15784
#> 2001  80.70925  84.94329  83.01409  88.36598
#> 2002  82.80101  87.59570  85.14553  90.77726
#> 2003  85.86117  89.83043  87.55681  93.25047
#> 2004  88.09934  92.74456  90.57541  96.18301
#> 2005  90.88507  96.25814  93.81338  99.69974
#> 2006  95.16302  99.87471  97.30352 103.70661
#> 2007  98.49848 103.40522 100.70968 107.42883
#> 2008 100.66222 105.30704 101.62194 105.59702
#> 2009  95.97397 100.52102  98.03501 103.08866
#> 2010  95.99081 100.74591  98.17384 103.08235
#> 2011  96.27694 100.35905  97.73056 101.07960
#> 2012  94.28296  97.18842  94.97122  97.67355
#> 2013  91.48738  95.92444  94.06831  97.15327
#> 2014  92.21522  96.79102  95.79536  99.58887
#> 2015  95.44493 100.84772  99.96972 103.73763
#> 2016  98.89095 104.05665 102.82881 105.88424
#> 2017 101.17216 107.36336 105.83766 109.20945
#> 2018 103.76333 110.04600 107.93819 111.98169
#> 2019 106.66485 112.06805 109.87812 113.62446
#> 2020 102.24984  87.77904 100.19127 103.63434
#> 2021  98.66124 104.79917 105.71192 111.00405
#> 2022 105.92953 112.40351 112.07366 115.73375
#> 2023 110.75484 114.94368 114.03496 118.34392
#> 2024 113.90055 118.91481 117.91383 122.21935
plot(gdp_volume)
lines(change_ref_year(gdp_volume, 2015))