library("JDCruncheR")
#>
#> Attaching package: 'JDCruncheR'
#> The following object is masked from 'package:base':
#>
#> writeThis vignette explains how to create a JVS Quality Report with the {JDCruncheR} package. This only works for v3.
The JVS (Job Vacancy Survey) plug-in is an add-on for the JDemetra+ software.
Version 2 is available on GitHub Sace2015: https://github.com/Sace2015/EurostatQR. You will find the plug-in documentation on the same repository.
In version 3, the plug-in is hosted on jdemetra’s GitHub, in the jdplus-incubator repository. To download the latest version, go to the Releases section, then download the plug-in (named jdplus-eurostat-desktop-plugin).
The plug-in contains 30 columns:
\[ 100 \times max(\left | \frac{Y_t - SA_t}{Y_t}\right |) \]
To create a JVS Quality Report, you need to use the JDemetra+ cruncher in version 3. First, if you do not have downloaded the JDemetra+ cruncher, you can download it from GitHub : https://github.com/jdemetra/jdplus-main/releases. The file you should download starts with “jwsacruncher-standalone”.
To call the cruncher, you can use the {rjwsacruncher} package with specific options.
The goal of this step is to generate a demetra_m file containing a lot of informations on series to study, and also several files containing the components of the series.
To generate those files, you need to use the cruncher with the following options:
library("rjwsacruncher")
options(
is_cruncher_v3 = TRUE,
default_matrix_item = c(
"span.start",
"span.end",
"log",
"span.n",
"regression.nout",
"regression.ntd",
"m-statistics.m7",
"decomposition.seasonal-filters",
"decomposition.trend-filter",
"decomposition.d7-trend-filter",
"quality.summary",
"regression.lp",
"regression.leaster",
"diagnostics.seas-sa-ac1:3",
"diagnostics.seas-sa-ac1",
"diagnostics.seas-lin-combined",
"regression.out(*)",
"regression.td-ftest:3",
"residuals.lb:3",
"diagnostics.td-sa-last:2",
"diagnostics.seas-sa-f:2",
"arima.p", "arima.d", "arima.q", "arima.bp", "arima.bd", "arima.bq",
"m-statistics.q", "m-statistics.q-m2"
),
default_tsmatrix_series = c(
"decomposition.y_cmp",
"decomposition.s_cmp",
"decomposition.sa_cmp",
"decomposition.t_cmp"
)
)
cruncher_and_param(
workspace = "path/to/the/workspace/file.xml",
cruncher_bin_directory = "path/to/the/cruncher/v3/bin/directory",
csv_layout = "vtable",
short_column_headers = FALSE,
refreshall = FALSE,
v3 = TRUE,
delete_existing_file = TRUE,
policy = "None"
)At this step, you should have generated 5 files.
Once the cruncher has generated the correct outputs, the JVS Quality Report can be generated.
# Path leading to the directory containing the needed files
dir_path <- system.file(
"extdata",
"WS/WS_world/Output/SAProcessing-1",
package = "JDCruncheR"
)
JVS <- extract_JVS(dir = dir_path)| Series | Method | Period | Nobs | Start | End | Adjustment |
|---|---|---|---|---|---|---|
| Siachen Glacier (frozen) | X13 | 12 | 300 | 2000-01-01 | 2024-12-01 | SCA |
| Nagorno-Karabakh (frozen) | X13 | 12 | 300 | 2000-01-01 | 2024-12-01 | SA |
| Mongolia (frozen) | X13 | 12 | 300 | 2000-01-01 | 2024-12-01 | SA |
| India (frozen) | X13 | 12 | 300 | 2000-01-01 | 2024-12-01 | SCA |
| Nepal (frozen) | X13 | 12 | 300 | 2000-01-01 | 2024-12-01 | SA |
| Philippines (frozen) | X13 | 12 | 300 | 2000-01-01 | 2024-12-01 | SA |
The JVS object is a dataframe containing the quality report. To save it, you need to export it.
To export the JVS Quality Report, you need to use the writing function. The report can be exported as a .csv file:
The report can be exported as a .xlsx file:
The column is called “Series” in R.
The names of the specifications are simply “X13” or “Tramo-Seats” in R, as there is no detail regarding the type of specification.
No differences.
In v3, the dates correspond to the last day of the period, whereas in R they correspond to the first day.
No differences.
For the tests:
Very slight differences due to different thresholds between the interface and the cruncher.
No differences.
There are slight differences between v3 (which uses the correct
number of degrees of freedom) and the R code, which uses
df = 1 (with the sd() function). In future
versions of the JVS plug-in, the results will be identical.
No differences.
The test is carried out using base R and may show slight differences (to within 10**4).
No differences.