# Example 1
# Smoother based on moving average with k=1.5:
require(tibble)
# Dataset in the format time by countries
myTB <- tibble::tibble(
time = 2010:2001,
IT = c(10,14,13,12,9,11,13,17,15,25),
DE = c(10,11,12,9,14,17,23,29,26,23)
)
resMA1 <- ma_dataset(myTB, kappa=1.5)
# Smoother based on moving average with k=3:
resMA2<-ma_dataset(myTB, kappa=3)
# Example 2
# Smoother based on moving average for the emp_20_64_MS Eurofound dataset:
myTB1 <- emp_20_64_MS[,c("time","IT","DE", "FR")]
# Smoother based on moving average with k=2:
resMAeu<-ma_dataset(myTB1, kappa=2, timeName= "time")
# Smoother based on moving average with k=3:
resMAeu1<-ma_dataset(myTB1, kappa=3, timeName= "time")
Run the code above in your browser using DataLab