rjdverse / rjdemetra

R interface to JDemetra+ v 2.x
https://rjdverse.github.io/rjdemetra
52 stars 16 forks source link

Avoid negative values #127

Closed jo-fleck closed 7 months ago

jo-fleck commented 9 months ago

I am trying to seasonally adjust quarterly employment data for different industries in US counties (measured in number of workers).

To my surprise, x13 sometimes returns negative values.

I assume it's because some of the data numbers are low (e.g. 50) or zero (but they are never negative of course).

I searched the documentation for an option to avoid negative seasonally adjusted values but could not find anything.

Is there any feature or setting that might help with this issue?

Thanks.

AQLT commented 9 months ago

There is no specific option for that. The negative values can usually be avoided using multiplicative decomposition. In your case, you have very small values that might prevent using multiplicative decomposition, you can try with pseudo-additive (see for example https://www.abs.gov.au/websitedbs/D3310114.nsf/home/Time+Series+Analysis:+The+Basics) using the x11.mode parameter.

jo-fleck commented 7 months ago

Many thanks for the instructions and the reference - very helpful!