Corona outliers
corona_outliers.Rd
Corona outliers as a type-date data frame. Also a function to update spec with these outliers.
Usage
corona_outliers(option = "ssb", freq = 12, day = "01", q_month = 1)
update_spec_corona_outliers(
spec,
option = "ssb",
freq = 12,
day = "01",
q_month = 1,
outlier_date_limit = "3000-01-01"
)
Examples
corona_outliers()
#> type date
#> 1 LS 2020-03-01
#> 2 LS 2020-04-01
#> 3 LS 2020-05-01
#> 4 LS 2020-06-01
#> 5 LS 2020-07-01
#> 6 LS 2020-08-01
#> 7 LS 2020-09-01
#> 8 LS 2020-10-01
#> 9 LS 2020-11-01
#> 10 LS 2020-12-01
#> 11 LS 2021-01-01
#> 12 LS 2021-02-01
#> 13 LS 2021-03-01
#> 14 LS 2021-04-01
#> 15 LS 2021-05-01
#> 16 LS 2021-06-01
#> 17 LS 2021-07-01
#> 18 LS 2021-08-01
#> 19 LS 2021-09-01
#> 20 LS 2021-10-01
#> 21 LS 2021-11-01
#> 22 LS 2021-12-01
#> 23 LS 2022-01-01
#> 24 LS 2022-02-01
#> 25 LS 2022-03-01
corona_outliers(freq = 4)
#> type date
#> 1 LS 2020-01-01
#> 2 LS 2020-04-01
#> 3 LS 2020-07-01
#> 4 LS 2020-10-01
#> 5 LS 2021-01-01
#> 6 LS 2021-04-01
#> 7 LS 2021-07-01
#> 8 LS 2021-10-01
#> 9 LS 2022-01-01
spec_a <- x13_spec(spec = "RSA3", transform.function = "Log")
spec_a2 <- update_spec_corona_outliers(spec_a)
s_preOut(spec_a)
#> [1] NA
s_preOut(spec_a2)
#> type date coeff
#> 1 LS 2020-03-01 NA
#> 2 LS 2020-04-01 NA
#> 3 LS 2020-05-01 NA
#> 4 LS 2020-06-01 NA
#> 5 LS 2020-07-01 NA
#> 6 LS 2020-08-01 NA
#> 7 LS 2020-09-01 NA
#> 8 LS 2020-10-01 NA
#> 9 LS 2020-11-01 NA
#> 10 LS 2020-12-01 NA
#> 11 LS 2021-01-01 NA
#> 12 LS 2021-02-01 NA
#> 13 LS 2021-03-01 NA
#> 14 LS 2021-04-01 NA
#> 15 LS 2021-05-01 NA
#> 16 LS 2021-06-01 NA
#> 17 LS 2021-07-01 NA
#> 18 LS 2021-08-01 NA
#> 19 LS 2021-09-01 NA
#> 20 LS 2021-10-01 NA
#> 21 LS 2021-11-01 NA
#> 22 LS 2021-12-01 NA
#> 23 LS 2022-01-01 NA
#> 24 LS 2022-02-01 NA
#> 25 LS 2022-03-01 NA
spec_b <- x13_spec(spec = "RSA3", transform.function = "Log",
usrdef.outliersEnabled = TRUE,
usrdef.outliersType = rep("AO", 3),
usrdef.outliersDate = c("2009-01-01", "2016-01-01", "2020-05-01"))
spec_b2 <- update_spec_corona_outliers(spec_b, outlier_date_limit = "2021-11-01")
s_preOut(spec_b)
#> type date coeff
#> 1 AO 2009-01-01 NA
#> 2 AO 2016-01-01 NA
#> 3 AO 2020-05-01 NA
s_preOut(spec_b2)
#> type date coeff
#> 1 AO 2009-01-01 NA
#> 2 AO 2016-01-01 NA
#> 3 AO 2020-05-01 NA
#> 4 LS 2020-03-01 NA
#> 5 LS 2020-04-01 NA
#> 6 LS 2020-06-01 NA
#> 7 LS 2020-07-01 NA
#> 8 LS 2020-08-01 NA
#> 9 LS 2020-09-01 NA
#> 10 LS 2020-10-01 NA
#> 11 LS 2020-11-01 NA
#> 12 LS 2020-12-01 NA
#> 13 LS 2021-01-01 NA
#> 14 LS 2021-02-01 NA
#> 15 LS 2021-03-01 NA
#> 16 LS 2021-04-01 NA
#> 17 LS 2021-05-01 NA
#> 18 LS 2021-06-01 NA
#> 19 LS 2021-07-01 NA
#> 20 LS 2021-08-01 NA
#> 21 LS 2021-09-01 NA
#> 22 LS 2021-10-01 NA