rjdverse / rjdemetra

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

Partial concurrent adjustment #107

Closed peterstoltze closed 2 years ago

peterstoltze commented 2 years ago

I have problems figuring out the best way to do partial concurrent adjustment, i.e. adding new observation to the time series, reestimate the regARIMA parameters but otherwise leaving everything as it was in the previous adjustment. What is the preferred method for this?

AQLT commented 2 years ago

Hi, Sorry for the late reply. There is no good way to do it in RJDemetra (and this functionality will certainly not be implemented in this package). I you want to keep everything with RJDemetra I think the best way would be to do run a cruncher on a workspace:

  1. Create your model with RJDemetra
  2. Save a workspace (see example https://jdemetra.github.io/rjdemetra/reference/add_sa_item.html)
  3. Update your time series in a workspace, for example using rjdworkspace (https://github.com/InseeFrLab/rjdworkspace, not in CRAN): a. Either use the function set_ts on each SaItem (https://inseefrlab.github.io/rjdworkspace/reference/set_ts.html) b. Or create a workspace in JDemetra+ with the same series as in 2 and with a default specification. This will allow you to have a workspace where the path to your data is saved inside the workspace (some metadata). You can then run update_metadata on the workspace created in 2 to update all the metadata that are in this new workspace. If your database is updated, the cruncher will automatically reload it.
  4. Run the jwsacruncher. rjwsacruncher (https://github.com/AQLT/rjwsacruncher, in CRAN) can help but it is not mandatory
  5. Reload your models in R with load_workspace

You will be able to do everything inside R with the new packages around JDemetra 3.0. They are still under development but you can see that in rjd3x13 and rjd3tramoseats (https://github.com/palatej/rjd3x13 and https://github.com/palatej/rjd3tramoseats) you have refresh.x13 and refresh.tramoseats functions.

peterstoltze commented 2 years ago

Thanks for an elaborate answer applicable now and promise of a slightly simpler future solution.