FRENCH MAJOR TRAUMA REGISTRYtraumabase.eu
TRAUMABASE · GOLDEN BASE

Data usage guide

Interpret missing values and prepare the data for analysis.

This guide explains missing-data markers, parent–child relationships, and import settings for Python, R and SAS.

01

Guide to missing values

Marker definitions

The Golden Base uses four markers to distinguish different meanings and sources of missingness. Their meaning should inform the analysis and the choice of a missing-data handling strategy, taking the missingness mechanism into account.

ND

Not available (Non disponible)

The information is expected, but was not found in the patient record.

NA

Not applicable

The value cannot exist in this context. For example: the dose of a treatment that was not administered.

NR

Not collected (Non renseigné)

The variable was not collected in this source or during this period.

IMP

Unobtainable measurement (Imprenable)

A physiological measurement could not be obtained, for example because the signal was too weak or absent.

Handling missingness in analysis

NA: use the clinical context

An imputation based on the clinical meaning of the variable may be justified for NA. When the parent answer establishes that an event or treatment was absent, the expected value may be “No” or 0. For example, if a treatment was not administered, its dose is recorded as NA by default in the Golden Base. In this context, it can be imputed as 0 with reasonable confidence.

Parent–child relationships

In the electronic case report form (eCRF), an answer can open or close another question. The parent variable determines whether the child variable applies.

Parent–child example: Medical transport – Catecholamines

Physician-accompanied transport?

Yes↓Catecholamines: Yes / No / NDND if unavailable
No↓NACatecholamine question not applicable
ND↓NDUnknown information

Imputation example: catecholamine dose

If no catecholamine was administered, the dose is recorded as NA in the Golden Base. The absence of treatment then supports imputing the dose as 0 for analysis.

NA imputation example: cardiac arrest
Clinical contextCardiac arrestNo spontaneous circulation
In the dataHeart rate (FC) : NASystolic blood pressure (PAS) : NADiastolic blood pressure (PAD) : NAMeasurements coded as not applicable in this context
For analysis0 may be usedIf this convention is justified for the variable and time point
View the parent–child dependency map

ND, NR and IMP: statistical methods

For ND, NR and IMP (and the rare cases where NA cannot be imputed using a clinical hypothesis), choose a statistical method suited to the research question and the missingness mechanism. Depending on the context, this may include multiple imputation, estimation methods that account for missing data, and sensitivity analyses.

NR may affect an entire collection period; IMP may be related to the clinical condition.

Suggested resources for handling missing values

R-miss-tastic provides methods, references, tutorials, and examples in R and Python to help choose an appropriate approach to missing data.

02

Technical notes

The Golden Base contains the literal string "NA" for “Not applicable”. Some software automatically converts it to a generic missing value on import, losing this distinction. Preserve all four markers before preparing variables for analysis.

The Golden Base CSV file uses commas as separators, and also as the decimal mark (in quotes, for example "12,5"). Columns that contain markers remain textual: after handling the markers according to the analysis plan, convert them to numbers (replacing the comma with a point) or dates. Preserve the format of identifiers whose leading zeros are significant.

Python / pandas

To import the CSV or Excel file with pandas:

import pandas as pd

na_values = ["", "nan", "NaN"]

# If you have a CSV file
df_csv = pd.read_csv(
    "golden_base.csv",
    decimal=",",
    keep_default_na=False,
    na_values=na_values,
)

# If you have an Excel file
df_excel = pd.read_excel(
    "golden_base.xlsx",
    keep_default_na=False,
    na_values=na_values,
)
  • keep_default_na=False: preserves the literal "NA" marker, which pandas would otherwise turn into a missing value.
  • na_values: only empty cells and the strings "nan" and "NaN" become missing values; "NA", "ND", "NR" and "IMP" are kept.
  • decimal=",": reads the decimals of numeric columns.

Reference documentation

R

To import the CSV or Excel file in R:

# If you have a CSV file
df_csv <- read.csv(
  "golden_base.csv",
  dec = ",",
  na.strings = c("", "nan", "NaN"),
  check.names = FALSE
)

# If you have an Excel file
df_excel <- readxl::read_excel(
  "golden_base.xlsx",
  na = c("", "nan", "NaN"),
  guess_max = 1048576
)
  • na.strings: lists the missing values without "NA", which read.csv() would otherwise treat as missing.
  • dec = ",": reads the decimals of numeric columns.
  • na: makes explicit that read_excel() only converts blank cells (and "nan", "NaN").
  • guess_max = 1048576: the maximum number of rows in an Excel worksheet: every row is examined to infer column types, even when markers appear late in the file.

SAS

To import the CSV or Excel file in SAS:

/* If you have a CSV file */
filename gb "golden_base.csv" encoding="utf-8" lrecl=1048576;
proc import datafile=gb out=work.golden_base dbms=csv replace;
    delimiter=",";
    guessingrows=max;
    getnames=yes;
run;

/* If you have an Excel file */
proc import datafile="golden_base.xlsx" out=work.golden_base dbms=xlsx replace;
    getnames=yes;
run;
  • encoding="utf-8": says the file is in UTF-8. Without it, SAS reads the file in its session encoding (often WLATIN1 on Windows) and special characters, such as accented letters, display incorrectly. An Excel file does not need it: its text is always stored as Unicode.
  • lrecl=1048576: avoids truncating the Golden Base’s very long lines.
  • guessingrows=max: examines every row to choose each column’s type and length.
  • dbms=xlsx: reads the Excel file; it requires the SAS/ACCESS Interface to PC Files module. Numbers are stored as such, with no decimal comma to convert, and encoding, lrecl and guessingrows only apply to the CSV file.
  • Session encoding: with a CSV file as with an Excel file, SAS converts the text into its session encoding. If the session is not in UTF-8, some special characters may be lost: check a few accented values after the import (%put &=sysencoding; shows the session encoding).
  • Markers and decimals: columns that contain markers or decimals written with a comma are imported as character. Convert them after handling the markers, for example with input(VARIABLE, commax32.).