-
Notifications
You must be signed in to change notification settings - Fork 0
/
a-Glossary-and-templates.Rmd
632 lines (568 loc) · 17 KB
/
a-Glossary-and-templates.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
---
title: "Glossary and templates"
output:
rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Glossary and templates}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
eval = FALSE,
comment = "#>",
warning = FALSE,
message = FALSE,
echo = TRUE)
```
```{r, eval = TRUE, echo = FALSE}
source('datatables.R')
```
The glossary describes the main objects used in Rmonize functions. The main
components of each object are listed and must have the names as presented to be
used in functions, except where indicated in square brackets ([…]).
An asterisk (<strong>*</strong>) indicates a required object or component. You
can download templates or find additional documentation where available using the
links provided.
## DataSchema
List of core variables to generate across datasets and related metadata.
<button><a
href="https://maelstrom-research.github.io/Rmonize-documentation/templates/dataschema%20-%20template.xlsx"
download>Download an Excel template</a>
</button>
### Variables *
Metadata table containing the list of core variables to generate across datasets
and related metadata about the variables. This table is required and uses the
following columns.
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>index</td>
<td>Index to order variables in the table.</td>
</tr>
<tr>
<td>name *</td>
<td>Name of the DataSchema variable. Each entry must be unique. The first entry
must be the primary identifier variable (e.g., participant unique ID).</td>
</tr>
<tr>
<td>label</td>
<td>Short description of the DataSchema variable. A language can be specified
using a language code, such as 'label:en' for english or 'label:fr' for french.
</td>
</tr>
<tr>
<td>valueType</td>
<td>
Value type of the input dataset variable (e.g., text, integer, decimal,
boolean, date, datetime). See
<a href="https://opaldoc.obiba.org/en/dev/magma-user-guide/value/type.html">
additional details</a>.</td>
</tr>
</tbody>
</table>
</div>
### Categories
Metadata table containing the list of categories and related metadata (coding
and description of the response options) defined for categorical variables
(if any). If there are categorical variables defined, this table is required
and uses the following columns.
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>variable *</td>
<td>Name of the DataSchema variable to which the category belongs. This column
is required if the Categories table is present. The value must also be present
in the column 'name' in the Variables table. </td>
</tr>
<tr>
<td>name *</td>
<td>Category code value. This column is required if the table Categories is
present. The combination of 'variable' and 'name' within the Categories table
(i.e., the combination of DataSchema variable and category code value) must be
unique.</td>
</tr>
<tr>
<td>label</td>
<td>Short description of the category code value. A language can be specified
using a language code, such as 'label:en' for english or 'label:fr' for french.
</td>
</tr>
<tr>
<td>missing</td>
<td>Boolean value (TRUE/FALSE or 1/0) indicating if the value in 'name' is
interpreted as a missing value (e.g., question skipped by design in a
questionnaire or a response option <em>"Prefer not to answer"</em>).</td>
</tr>
</tbody>
</table>
</div>
## Input Dataset
Data table containing a collection of variables to process under the
DataSchema format.
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>[col_1] *</td>
<td>First variable in the input dataset, typically the identifier or index.
A dataset must have at least one variable.</td>
</tr>
<tr>
<td>[col_2] ...</td>
<td>Additional variable(s) in the input dataset.</td>
</tr>
</tbody>
</table>
</div>
## Input Data Dictionary
List of variables in an input dataset and related metadata.
<button><a
href="https://maelstrom-research.github.io/Rmonize-documentation/templates/data_dictionary%20-%20template.xlsx"
download>Download an Excel template</a>
</button>
### Variables *
Metadata table containing the list of variables in an input dataset and metadata
about the input variables. If a data dictionary is defined for an input dataset,
this table is required and uses the following columns.
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>index</td>
<td>Index to order variables in the table. </td>
</tr>
<tr>
<td>name *</td>
<td>Name of the input dataset variable.
Each entry must be unique. The first entry is typically the primary identifier
variable (e.g., participant unique ID).</td>
</tr>
<tr>
<td>label</td>
<td>Short description of the input dataset variable. A language can be specified
using a language code, such as 'label:en' for english or 'label:fr' for french.
</td>
</tr>
<tr>
<td>valueType</td>
<td>
Value type of the input dataset variable (e.g., text, integer, decimal,
boolean, date, datetime). See
<a href="https://opaldoc.obiba.org/en/dev/magma-user-guide/value/type.html">
additional details</a>.</td>
</tr>
</tbody>
</table>
</div>
### Categories
Metadata table containing the list of categories and related metadata (coding
and description of the response options) defined for categorical variables
(if any). If there are categorical variables defined, this table is required
and uses the following columns.
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>variable *</td>
<td>Name of the input dataset variable to which the category belongs. This column
is required if the Categories table is present. The value must also be present
in the column 'name' in the Variables table. </td>
</tr>
<tr>
<td>name *</td>
<td>Category code value. This column is required if the table Categories is
present. The combination of 'variable' and 'name' within the Categories table
(i.e., the combination of DataSchema variable and category code value) must be
unique.</td>
</tr>
<tr>
<td>label</td>
<td>Short description of the category code value. A language can be specified
using a language code, such as 'label:en' for english or 'label:fr' for french.
</td>
</tr>
<tr>
<td>missing</td>
<td>Boolean value (TRUE/FALSE or 1/0) indicating if the value in 'name' is
interpreted as a missing value (e.g., question skipped by design in a
questionnaire or a response option <em>"Prefer not to answer"</em>).</td>
</tr>
</tbody>
</table>
</div>
## Dossier
Set of one or more input dataset(s) and their associated input
data dictionary(ies).
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>[input_dataset_1] *</td>
<td>Data table containing a collection of variables to process under the
DataSchema formats and its associated input data dictionary. At least one
input dataset is required. The input dataset name is defined by the user and is
indicated in the Data Processing Elements column 'input_dataset'. This name
identifies the source of input variables for data processing.</td>
</tr>
<tr>
<td>[input_dataset_2] ...</td>
<td>Additional input dataset and associated data dictionary.</td>
</tr>
</tbody>
</table>
</div>
## Data Processing Elements
Metadata table containing the elements defining the possibility for each
input dataset to generate each DataSchema variable and, where applicable, the
algorithms to generate harmonized variables in the DataSchema formats.
<button><a
href="https://maelstrom-research.github.io/Rmonize-documentation/templates/data_processing_elements%20-%20template.csv"
download>Download an csv template</a>
</button>
See
[additional documentation for Data Processing Elements](https://maelstrom-research.github.io/Rmonize-documentation/articles/b-Data-processing-elements.html).
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>index</td>
<td>Index to order algorithms in the table. </td>
</tr>
<tr>
<td>dataschema_variable *</td>
<td>Name of the DataSchema variable being generated (must match a variable in
the DataSchema).The first entry must be the primary identifier variable (e.g.,
participant unique ID).</td>
</tr>
<tr>
<td>label</td>
<td>Short description of the DataSchema variable (as in the DataSchema).</td>
</tr>
<tr>
<td>valueType</td>
<td>Value type of the DataSchema variable (as in the DataSchema).</td>
</tr>
<tr>
<td>input_dataset *</td>
<td>Name of the Input Dataset used to generate the DataSchema variable (as named
in the Dossier).</td>
</tr>
<tr>
<td>input_variables *</td>
<td>Name of the variable(s) in the 'input_dataset' used to generate
the DataSchema variable.</td>
</tr>
<tr>
<td>Mlstr_harmo:rule_category *</td>
<td>Type of algorithm used to generate the DataSchema variable from the input
variables. The first entry must be the creation of a harmonized primary
identifier variable (e.g., participant unique ID).</td>
</tr>
<tr>
<td>Mlstr_harmo:algorithm *</td>
<td>Algorithm used to generate the DataSchema variable from the
input variables.</td>
</tr>
<tr>
<td>Mlstr_harmo:status</td>
<td>Possibility to generate the DataSchema variable from the input dataset.
This is considered "complete" if the DataSchema variable can be generated from
the input dataset or "impossible" if not.</td>
</tr>
<tr>
<td>Mlstr_harmo:status_detail</td>
<td>Additional information about the possibility to generate the DataSchema
variable from the input dataset. If 'Mlstr_harmo:status' is "complete", the
information could be considered "identical" or "compatible" with the DataSchema
variable. If 'Mlstr_harmo:status' is "impossible", the information could be
considered "incompatible" or "unavailable" for harmonization.</td>
</tr>
<tr>
<td>Mlstr_harmo:comment</td>
<td>Additional information about the inputs or algorithms to document with the
harmonized variable.</td>
</tr>
</tbody>
</table>
</div>
## Harmonized Dataset
Data table containing a collection of harmonized variables processed under
the DataSchema formats.
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>[harmonized_variable_1] *</td>
<td>First harmonized variable. This is the primary identifier variable (e.g.,
participant unique ID). Variables in the harmonized dataset are generated in
the order defined in the DataSchema.</td>
</tr>
<tr>
<td>[harmonized_variable_2] ...</td>
<td>Additional harmonized variable.</td>
</tr>
</tbody>
</table>
</div>
## Harmonized Data Dictionary
List of variables in a harmonized dataset and related metadata.
### Variables *
Metadata table containing the list of variables in a harmonized dataset
and metadata about the harmonized variables (taken from the DataSchema and
Data Processing Elements).
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>index</td>
<td>Index to order variables in the table (taken from the DataSchema).</td>
</tr>
<tr>
<td>name *</td>
<td>Name of the harmonized variable (taken from the DataSchema).</td>
</tr>
<tr>
<td>label</td>
<td>Short description of the harmonized variable (taken from the DataSchema).</td>
</tr>
<tr>
<td>valueType</td>
<td>Value type of the harmonized variable (taken from the DataSchema).</td>
</tr>
<tr>
<td>Mlstr_harmo:rule_category</td>
<td>Type of algorithm used to generate the DataSchema variable from the
input variables (taken from the Data Processing Elements).</td>
</tr>
<tr>
<td>Mlstr_harmo:algorithm</td>
<td>Algorithm used to generate the harmonized variable from the
input variables (taken from the Data Processing Elements).</td>
</tr>
<tr>
<td>Mlstr_harmo:status</td>
<td>Possibility to generate the DataSchema variable from the
input dataset (taken from the Data Processing Elements).</td>
</tr>
<tr>
<td>Mlstr_harmo:status_detail</td>
<td>Additional information about the possibility to generate the DataSchema
variable from the input dataset (taken from the Data Processing Elements).</td>
</tr>
<tr>
<td>Mlstr_harmo:comment</td>
<td>Additional information about the inputs or algorithms to document with the
harmonized variable (taken from the Data Processing Elements).</td>
</tr>
</tbody>
</table>
</div>
### Categories
Metadata table containing the list of categories and related metadata (taken
from the DataSchema).
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>variable *</td>
<td>Name of the harmonized variable to which the category belong (taken from
the DataSchema).</td>
</tr>
<tr>
<td>name *</td>
<td>Category code value (taken from the DataSchema).</td>
</tr>
<tr>
<td>label</td>
<td>Short description of the category code value (taken from the DataSchema).
</td>
</tr>
<tr>
<td>missing</td>
<td>Boolean value (TRUE/FALSE or 1/0) indicating if the value in 'name' is
interpreted as a missing value (taken from the DataSchema).</td>
</tr>
</tbody>
</table>
</div>
## Harmonized Dossier
Set of one or more harmonized dataset(s) and their associated data
dictionary(ies).
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>[harmonized_dataset_1] *</td>
<td>Data table containing a collection of harmonized variables processed under
the DataSchema format and its associated data dictionary. There is one
harmonized dataset per input dataset.</td>
</tr>
<tr>
<td>[harmonized_dataset_2] ...</td>
<td>Additional harmonized dataset and its associated data dictionary.</td>
</tr>
</tbody>
</table>
</div>
## Pooled Harmonized Dataset
Combined data table containing multiple harmonized datasets processed under the
same DataSchema formats.
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>[harmonized_dataset_1] *</td>
<td>First harmonized variable. This is the primary unique identifier variable.
Variables in the harmonized dataset are generated in the order defined in
the DataSchema.</td>
</tr>
<tr>
<td>[harmonized_dataset_2] ...</td>
<td>Additional harmonized variable.</td>
</tr>
</tbody>
</table>
</div>
## Pooled Harmonized Data Dictionary
List of variables in a pooled harmonized dataset and related metadata.
### Variables *
Metadata table containing the list of variables in a pooled harmonized dataset
and metadata about the harmonized variables (taken from the DataSchema).
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>index</td>
<td>Index to order variables in the table (taken from the DataSchema).</td>
</tr>
<tr>
<td>name *</td>
<td>Name of the harmonized variable (taken from the DataSchema).</td>
</tr>
<tr>
<td>label</td>
<td>Short description of the harmonized variable (taken from the DataSchema).</td>
</tr>
<tr>
<td>valueType</td>
<td>Value type of the harmonized variable (taken from the DataSchema).</td>
</tr>
</tbody>
</table>
</div>
### Categories
Metadata table containing the list of categories and related metadata (taken
from the DataSchema).
<div style="padding-left: 10px; padding-right: 10px; background-color: #eee;">
<table style="display: table">
<thead>
<tr class="header">
<th>Name</th>
<th width="75%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>variable *</td>
<td>Name of the harmonized variable to which the category belong (taken from
the DataSchema).</td>
</tr>
<tr>
<td>name *</td>
<td>Category code value (taken from the DataSchema).</td>
</tr>
<tr>
<td>label</td>
<td>Short description of the category code value (taken from the DataSchema).
</td>
</tr>
<tr>
<td>missing</td>
<td>Boolean value (TRUE/FALSE or 1/0) indicating if the value in 'name' is
interpreted as a missing value (taken from the DataSchema).</td>
</tr>
</tbody>
</table>
</div>