Skip to contents

Extract a JVS report from the output files of JDemetra+. The output files can be generated with the GUI or with the cruncher and are CSV files containing the diagnostics matrix and the output series.

Usage

extract_JVS(
  dir = NULL,
  demetra_m = NULL,
  y = NULL,
  sa = NULL,
  s = NULL,
  t = NULL,
  ...
)

Arguments

dir

path to the directory containing the demetra_m.csv, series_decomposition_y_cmp.csv, series_decomposition_sa_cmp.csv, series_decomposition_s_cmp.csv and series_decomposition_t_cmp.csv files.

demetra_m

data.frame containing the diagnostics matrix. If missing or NULL, the file is searched for in dir.

y

data.frame containing the initial series. If missing or NULL, the file is searched for in dir.

sa

data.frame containing the seasonally adjusted series. If missing or NULL, the file is searched for in dir.

s

data.frame containing the seasonal component of the series. If missing or NULL, the file is searched for in dir.

t

data.frame containing the trend component series. If missing or NULL, the file is searched for in dir.

...

Other parameters to pass to read_demetra_m() such as sep (the separator used in the csv file. By default, sep = ";") and dec (the decimal separator used in the csv file. By default, dec = ",")

Value

a JVS_matrix object.

Details

This function generates a JVS report from the output of JDemetra+. The output needed are the demetra_m diagnostics matrix (usually from the file demetra_m.csv) and the series y, sa, s and t (usually read from the series CSV files).

All this files can be generated by launching the cruncher (functions cruncher_and_param).

For more information about the generation of the output, see the vignette: browseVignettes(package = "JDCruncheR")

If the series are provided, they have to be data.frame with the dates in the first column and the values of the series in the other columns.

This function returns a JVS_matrix object, which is a data.frame containing several indications on the seasonal adjustment of the series.

If all data frames (demetra_m, y, sa, s and i) are supplied, the dir argument is ignored. Otherwise, dir should point to the directory containing the corresponding CSV files.

See also

Traduction française

Other JVS_matrix functions: write.JVS_matrix()

Examples

# Path leading to the directory containing the needed files

dir_path <- system.file(
    "extdata",
    "WS/WS_world/Output/SAProcessing-1",
    package = "JDCruncheR"
)

# Extract the JVS report from the directory
JVS <- extract_JVS(dir = dir_path)