What is an instance index?

#CheadleDA UK Biobank Data Analysts
#CheadleDA UK Biobank Data Analysts The helpers that keep the community running smoothly. UKB Community team Data Analyst
  • Updated

An instance index is used to distinguish data for a data-field that was collected at different times.

For many fields this follows instancing coding 2, where i0 indicates the initial baseline assessment, i1 is a repeat assessment in 2012-13, i2 is an imaging assessment and i3 is a repeat imaging assessment. For other fields, such as accelerometer data or questionnaire data, the instancing does not relate to an assessment, but rather to repeats of similar measurements.

Where a field has more than one instance, the data tab will specify what instancing coding is being used.

More on Instances

More on Arrays

RAP Field name formats including Instances and Arrays  

Example

Standard tabular fields in the UK Biobank RAP, which have Entity : Participant,  can be treated as rectangular, with one participant per row, and one or more columns per Showcase field. A field has multiple columns when it has arrays or instances. In general, the instance index is used for data which were gathered at different times, and the array index is used for multiple pieces of data which were gathered at the same time.

The "data" in the image below is not real UKB data, it is synthetic items in the format that is used in the RAP.   It is essential not to share real UKB data.

The "eid" is the encoded participant identifier for the project in question. The remaining column headers are in the format pF_iI_aA where F is the field number, I is the instance index and A is the array index.

Two fields are shown in the synthetic dataset: field 53 (Date of attending assessment centre) and field 20002 (Non-cancer illness code, self-reported). In each case there are three “instances” of the variable. Using the “Instances” tab on the field 53 page on Showcase, or clicking on the “2” of “Instancing 2” on the field 20002 page, we can see that these correspond to the visit type: 0 for the initial (baseline) visit, 1 for the repeat assessment and 2 for the first imaging assessment. Instance 3, repeat imaging, is omitted here for space reasons.

The columns p53_i0, p53_i1 and p53_i2 hold the dates when each participant attended that particular type of assessment centre. In the above example data, all participants attended a baseline assessment centre (this would always be the case), but only two participants (2328974 & 3315794) attended the repeat assessment, one of whom (3315794) also attended an imaging centre. Participant 1256847 attended an imaging centre, but did not attended the repeat assessment.

At each assessment centre visit a participant can self-report illnesses, and these are recorded in field 20002. The illnesses are coded using Coding 6, as indicated on the field 20002 page on Showcase. Clicking on the “6” of “Coding 6” on that page gives the meanings of these codes.

For example: looking at the participant with eid 3315794 we see that at each of their three assessment centre visits they self-reported having asthma (code 1111). As the first condition reported at each visit this is assigned to have array index 0 at each visit. At their imaging assessment visit (instance 2) they also reported hypertension (code 1065), which is assigned to array index 1, p20002_i2_a1.

Note that in reality field 20002 has array indices running from 0 to 33 (indicating that at least one participant self-reported 34 different illness codes at one visit), and so the real dataset would be considerably wider than that shown above.

For some fields, "instance" does not mean "visit". For example, the “Diet by 24-hour recall” fields (see Category 100090) use instance 0 to refer to the baseline assessment centre (as above), but then use instances 1 to 4 to refer to the four on-line cycles of this questionnaire. As another example, reports from the cancer registry (see Category 100092) are given a new instance index for each additional type of cancer reported.

 

Related to

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.