deflate | R Documentation |
Gets a price index and aggregates it, if needed. Then divides the series with the price index and rebase result to base year.
deflate(
x,
time,
deflator = "eki",
index = NULL,
class = NULL,
freq = "m",
baseyear = 2015
)
x |
A series to deflate |
time |
A time vector. |
deflator |
A name of the deflatior. "eki" or "thi". |
class |
A name of classification for thi |
freq |
A frequency of |
baseyear |
A base year to rebase. |
series |
A name of index series for thi. |
Price index available:
eki Elinkustannusindeksi
thi Tuottajahintaideksi
For thi index and class have be specified:
index, one of: "Teollisuuden tuottajahintaindeksi", "Teollisuuden tuottajahintaindeksi, kotimaiset tavarat", "Teollisuuden tuottajahintaindeksi, vientitavarat", "Vientihintaindeksi", "Tuontihintaindeksi", "Kotimarkkinoiden perushintaindeksi", "Kotimarkkinoiden perushintaindeksi, kotimaiset tavarat", "Kotimarkkinoiden perushintaindeksi, tuontitavarat", "Verollinen kotimarkkinoiden perushintaindeksi", "Verollinen kotimarkkinoiden perushintaindeksi, kotimaiset tavarat", "Verollinen kotimarkkinoiden perushintaindeksi, tuontitavarat"
class one of Tuotteet toimialoittain (CPA 2015, MIG) classification
A numeric vector
pttrobo::ptt_data_robo("StatFin/ati/statfin_ati_pxt_11zt.px") |>
filter_recode(
tiedot = c("Ansiotaso" = "Ansiotasoindeksi 1964=100")
) |>
mutate(real = deflate(value, time, deflator = "eki", freq = "q", baseyear = 2015)) |>
tail()
pttrobo::ptt_data_robo(
"tulli/uljas_sitc",
dl_filter = list(
"Tavaraluokitus SITC2" = c("01 (2002--.) Liha ja lihatuotteet"),
"Maa" = "AA",
"Suunta" = c("Tuonti alkuperämaittain"),
"Indikaattorit" = c("Tilastoarvo (euro)"))) |>
mutate(real = deflate(value, time, deflator = "thi",
index = "Tuontihintaindeksi",
class = "10.1 Säilötty liha ja lihavalmisteet")) |>
tail()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.