This function scans a Demetra+ workspace (.xml) and removes regression outliers whose p-values are above a given threshold. Both the estimation specification and the domain specification are updated accordingly, and the workspace file is saved in place.

Typical use case: after automatic model estimation, outliers with weak statistical significance (e.g. p > 0.3) are dropped to simplify the regression specification.

remove_non_significative_outliers(ws_path, threshold = 0.3)

Arguments

ws_path

[character] Path to a Demetra+ workspace file (usually with extension .xml).

threshold

[numeric] Maximum p-value for keeping an outlier. Outliers with Pr(>|t|) > threshold are removed. Default is 0.3.

Value

The function invisibly returns NULL, but it modifies the workspace file in place (saved at the same location as ws_path).

Details

The function:

  • iterates over all seasonal adjustment models (SAI) in the workspace,

  • identifies regression outliers in the regarima specification,

  • checks their p-values in the pre-processing regression summary,

  • removes those with p-values above the threshold from both estimationSpec and, if present, domainSpec,

  • re-saves the workspace file.

Examples

if (FALSE) { # \dontrun{
# Remove non-significant outliers (p > 0.3) from a workspace
remove_non_significative_outliers("workspace.xml", threshold = 0.3)
} # }