Skip to content
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

Difference between decomposition and finals #58

Closed
TanguyBarthelemy opened this issue Oct 4, 2024 · 3 comments
Closed

Difference between decomposition and finals #58

TanguyBarthelemy opened this issue Oct 4, 2024 · 3 comments

Comments

@TanguyBarthelemy
Copy link
Contributor

In the output of x13 function some series are duplicated between decomposition and finals.

For example:

x <- AirPassengers +
    c(rep(0, 100), 200, rep(0, 43)) + # Ajout d'un AO en mai 1957
    c(rep(0, 80), rep(-100, 64)) # Ajout d'un LS en septembre 1955
plot(x)

image

Created on 2024-10-04 with reprex v2.1.1

d11

There are 2 variables decomposition.d11 and finals.d11.

mod_v3 <- rjd3x13::x13(x, spec = "RSA3", userdefined = c("decomposition.d11", "finals.d11"))
d11 <- cbind(mod_v3$user_defined$finals.d11, mod_v3$user_defined$decomposition.d11)
ts.plot(d11, col = c("blue", "red"), lwd = c(2, 1))
legend("left", c("finals.d11", "decomposition.d11"), col = c("blue", "red"), lwd = c(2, 1))

image

Created on 2024-10-04 with reprex v2.1.1

d12

Same thing for d12

mod_v3 <- rjd3x13::x13(x, spec = "RSA3", userdefined = c("decomposition.d12", "finals.d12"))
d12 <- cbind(mod_v3$user_defined$finals.d12, mod_v3$user_defined$decomposition.d12)
ts.plot(d12, col = c("blue", "red"), lwd = c(2, 1))
legend("left", c("finals.d12", "decomposition.d12"), col = c("blue", "red"), lwd = c(2, 1))

image

Created on 2024-10-04 with reprex v2.1.1

d13

Same thing for d13

mod_v3 <- rjd3x13::x13(x, spec = "RSA3", userdefined = c("decomposition.d13", "finals.d13"))
d13 <- cbind(mod_v3$user_defined$finals.d13, mod_v3$user_defined$decomposition.d13)
ts.plot(d13, col = c("blue", "red"), lwd = c(2, 1))
legend("left", c("finals.d13", "decomposition.d13"), col = c("blue", "red"), lwd = c(2, 1))

image

Created on 2024-10-04 with reprex v2.1.1

It seems that the d series in decomposition are corrected from the outliers (linearised series).
Should this series be renamed?

@AQLT
Copy link
Contributor

AQLT commented Oct 4, 2024

Yes this is not as in V2 where the final components of the decomposition table also includes the pre-processing. In V3 you clearly separate the pre-processing, the decomposition and the final components (finals). This allow to more easily compute some statistics (for example the residual seasonality tests are made on the decomposition table and not the final tables). For example, those components where recently added in RJDemetra (rjdverse/rjdemetra#139)

@TanguyBarthelemy
Copy link
Contributor Author

Ok yes, but I add in mind that the d11 component referred to a single series. So why are finals.d11 and decomposition.d11 different? Shouldn't we be talking about linearised series instead or in the X11 process, isn't there another name for these series with or without outliers?

@annasmyk
Copy link
Member

we discussed this, I close it for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants