refresh: Refresh a Workspace or SA-Processing

jsap_refreshR Documentation

Refresh a Workspace or SA-Processing

Description

Refresh a Workspace or SA-Processing

Usage

jsap_refresh(
  jsap,
  policy = c("FreeParameters", "Complete", "Outliers_StochasticComponent", "Outliers",
    "FixedParameters", "FixedAutoRegressiveParameters", "Fixed", "Current"),
  period = 0,
  start = NULL,
  end = NULL,
  info = c("All", "Data", "None")
)

jws_refresh(
  jws,
  policy = c("FreeParameters", "Complete", "Outliers_StochasticComponent", "Outliers",
    "FixedParameters", "FixedAutoRegressiveParameters", "Fixed", "Current"),
  period = 0,
  start = NULL,
  end = NULL,
  info = c("All", "Data", "None")
)

Arguments

policy

refresh policy to apply (see details).

period, start, end

additional parameters used to specify the span When policy = "Outliers" or policy = "Outliers_StochasticComponent" period: numeric, number of observations in a year (12, 4...), compulsory, if mis-specified or missing, re-estimation with refreshed specification won't work. end has to be specified as the date from which outliers will be re-identified

info

indication on how data should be refreshed All: data and metadata will be refreshed (default) Data: data will be refreshed, not metadata None: nor data neither metadata will be refreshed, to be used for updating specifications only.

jws, jsap

Java Workspace or SA-Processing

Details

A particular selection of parameters to be kept fixed or re-estimated is called a revision policy. Workspace has to be computed before refresh When refreshing data, empty your cache by restarting your R session, before refreshing, otherwise the specification will be refreshed but the new data will not be taken into account.

Available refresh policies are:

  1. Fixed: applying the current pre-adjustment reg-arima model and replacing forecasts by new raw data points; X11 (or SEATS) and Benchmarking part parameters are untouched.

  2. FixedParameters: pre-adjustment reg-arima model is partially modified: regression coefficients will be re-estimated but regression variables, Arima orders and coefficients are unchanged; X11 (or SEATS) and Benchmarking part parameters are untouched.

  3. FixedAutoRegressiveParameters: same as FixedParameters but Arima Moving Average coefficients (MA) are also re-estimated, Auto-regressive (AR) coefficients are kept fixed; X11 (or SEATS) and Benchmarking part parameters are untouched.

  4. FreeParameters: all regression and Arima model coefficients are re-estimated, regression variables and Arima orders are kept fixed; X11 (or SEATS) and Benchmarking part parameters are untouched.

  5. Outliers: regression variables and Arima orders are kept fixed, but outliers will be re-detected on the defined span, thus all regression and Arima model coefficients are re-estimated; X11 (or SEATS) and Benchmarking part parameters are untouched.

  6. Outliers_StochasticComponent: same as "Outliers" but Arima model orders (p,d,q)(P,D,Q) can also be re-identified; X11 (or SEATS) and Benchmarking part parameters are untouched.

  7. Complete: All the parameters are re-identified and re-estimated, unless constrained in the reference spec. X11 (or SEATS) and Benchmarking part parameters are entirely reset to values in the reference specification.

Value

refreshed workspace or SAP

References

More information on revision policies in JDemetra+ documentation: https://doc.jdemetra.org/a-rev-policies

Examples



# Load workspace
file <- system.file("workspaces", "workspace_test_refresh.xml", package = "rjd3workspace")


jws <- jws_open(file)
txt_update_path(
    jws = jws,
    new_path = system.file("extdata", "IPI_nace4.csv", package = "rjd3workspace")
)
jws_compute(jws)

# Read current workspace: reference spec and estimation spec
jws1 <- jws_make_copy(jws)
rws <- read_workspace(jws1, compute = TRUE)
rws$processing$`SAProcessing-1`$`RF0811`$referenceSpec
rws$processing$`SAProcessing-1`$`RF0811`$estimationSpec

# Refresh workspace COMPLETE
jws2 <- jws_make_copy(jws)
jws_refresh(jws2, policy = "Complete")

# Read refreshed workspace: new estimation spec
rws2 <- read_workspace(jws2, compute = TRUE)
rws2$processing$`SAProcessing-1`$`RF0811`$estimationSpec

# Refresh workspace Outliers (like "lastoutliers in the GUI, but with custom start date)
jws3 <- jws_make_copy(jws)
jws_refresh(jws3, policy = "Outliers", period = 12, end = c(2020, 4))

# Read refreshed workspace: new estimation spec
rws3 <- read_workspace(jws3, compute = TRUE)
rws3$processing$`SAProcessing-1`$`RF0811`$estimationSpec



rjd3workspace documentation built on July 17, 2026, 9:07 a.m.