-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quality report - lpyear #21
Comments
1. transform spec (pre-adjustment of the input series): I cannot find any trace of this parameter in the RJDemetra output after it is set. Example: require(persephone)
x <- per_x13(AirPassengers, transform.function = "Log", transform.adjust = "LeapYear",
userdefined = c("preprocessing.model.lp","preprocessing.model.log"),
template = "RSA0")
x$run()
x$output$user_defined$preprocessing.model.lp
# NULL
x$output$user_defined$preprocessing.model.log
# [1] "true" The only trace I can find of it is in the parameters slot itself: x$params$regarima$transform
# tfunction adjust aicdiff
#Predefined None None -2
#User_modif Log LeapYear NA
#Final Log LeapYear -2 userdefvar <- RJDemetra::user_defined_variables(sa_object = c("X13-ARIMA"))
grep("lp", userdefvar, value=TRUE)
#[1] "preprocessing.model.lp" "diagnostics.seas-lin-spectralpeaks"
#[3] "diagnostics.seas-res-spectralpeaks" "diagnostics.seas-i-spectralpeaks"
#[5] "diagnostics.seas-sa-spectralpeaks"
grep("leap", userdefvar, value=TRUE)
#character(0) 2. regression spec (including the leap-year effect in the model): I can't seem to find the right way to do this. According to the RJDemetra-R-help, the parameter is set as follows: ?RJDemetra::x13_spec
But with this, I get the following result where the leap year is not included in the model: require(persephone)
x <- per_x13(AirPassengers, tradingdays.leapyear="LeapYear", transform.adjust="None",
tradingdays.autoadjust=FALSE,
template = "RSA0")
x$run()
x$output$regarima$model$spec_rslt
# Model T.span Log transformation Mean Trading days
#1 RegARIMA - X13 from 1-1949 to 12-1960 FALSE FALSE 0
# Leap year Easter Outliers
#1 FALSE FALSE 0 The only way I can get a result containing a leap year is by using the predefined model specification "RSA5c": myseries <- persephone::pi_caladj[ , -c(1:2)][ ,"BE"]
x <- per_x13(myseries, template = "RSA5c")
x$run()
x$output$regarima$model$spec_rslt
# Model T.span Log transformation Mean Trading days
#1 RegARIMA - X13 from 1-2000 to 6-2019 FALSE FALSE 7
# Leap year Easter Outliers
#1 TRUE FALSE 2 |
In fact in the current version of JDemetra+ (and so in RJDemetra) you cannot just add the Leap Year without adding trading days. library(RJDemetra)
spec <- x13_spec("RSA0", tradingdays.leapyear="LeapYear", transform.adjust="None",
tradingdays.autoadjust=FALSE,tradingdays.test = "None")
x <- jx13(AirPassengers, spec)
get_indicators(x, "preprocessing.model.lp" )
#> $preprocessing.model.lp
#> NULL
spec2 <- x13_spec("RSA0",tradingdays.option = "TradingDays", tradingdays.leapyear="LeapYear", transform.adjust="None",
tradingdays.autoadjust=FALSE,tradingdays.test = "None")
x2 <- jx13(AirPassengers, spec2)
get_indicators(x2, "preprocessing.model.lp" )
#> $preprocessing.model.lp
#> [1] "Leap year:10,041[2,517]" Created on 2020-04-08 by the reprex package (v0.3.0) |
Could you please post a working example of where you set the leap year with the transform spec? |
The information on the inclusion of a leap year effect in the quality report is not always correct.
Leap year effect could be specified in the transform spec (transform.adjust="Lpyear") or alternatively in the regression spec. Maybe one the transform spec was not considered in this case.
The text was updated successfully, but these errors were encountered: