rjdverse / rjd3x13

R access to X13-Arima algorithm in JDemetra+ version 3.x
https://rjdverse.github.io/rjd3x13/
European Union Public License 1.2
5 stars 8 forks source link

x13_refresh: policy "current" behaves like "fixed" #38

Closed annasmyk closed 3 months ago

annasmyk commented 4 months ago

Policy "Current" behaves like "Fixed"' no AO s added on new data point

y<- rjd3toolkit::ABS$X0.2.08.10.M

raw series for first estimation

y_raw <-window(y,end = 2009)

raw series for second (refreshed) estimation

y_new <-window(y,end = 2010)

specification for first estimation

spec_x13_1<-x13_spec("rsa5c")

first estimation

sa_x13<- x13(y_raw, spec_x13_1)

refreshing the specification

current_result_spec <- sa_x13$result_spec current_domain_spec <- sa_x13$estimation_spec spec_x13_ref <- x13_refresh(current_result_spec, # point spec to be refreshed current_domain_spec, #domain spec (set of constraints) policy = "Current", period = 12, start= c(1982,4), end=c(2008,12)) spec_x13_ref # all parameters are fixed

2nd estimation with refreshed specification

sa_x13_ref <- x13(y_new, spec_x13_ref)

sa_x13_ref$result$preprocessing # no new AOs sa_x13_ref$result$preprocessing$description$variables # no new AOs

window(sa_x13_ref$result$final$d11final,start=2009, end=2010)

refresh with "Fixed"

spec_x13_ref <- x13_refresh(current_result_spec, # point spec to be refreshed current_domain_spec, #domain spec (set of constraints) policy = "Fixed") sa_x13_ref <- x13(y_new, spec_x13_ref)
window(sa_x13_ref$result$final$d11final,start =2009, end=2010) # same result as current

annasmyk commented 3 months ago

bugs fixed, documentation up to date