1 Introduction

The PEDALFAST (PEDiatric vALidation oF vAriableS in TBI) project was a prospective cohort study conducted at multiple American College of Surgeons freestanding level I Pediatric Trauma Centers. The cohort consists of patients under 18 years of age who were admitted to the intensive care unit (ICU) with an acute traumatic brain injury (TBI) diagnosis and Glasgow Coma Scale (GCS) score not exceeding 12 or a neurosurgical procedure (intracranial pressure [ICP] monitor, external ventricular drain [EVD], craniotomy, or craniectomy) within the first 24 hours of admission.

This data set was used for several publications:

  • Bennett, DeWitt, Greene, et al. (2017)
  • Bennett, DeWitt, Dixon, et al. (2017)
  • Bennett et al. (2016)

Funded by NICHD grant number R03HD094912 we retroactively mapped the data collected by the PEDALFAST project the Federal Interagency Traumatic Brain Injury Research (FITBIR) data standard. The R data package *pedalfast.data* provides the data submitted to FITBIR as both raw files and in ready to use R data sets.

The PEDALFAST study data were collected and managed using REDCap electronic data capture tools hosted at the University of Colorado Denver. (Harris et al. 2009) REDCap (Research Electronic Data Capture) is a secure, web-based application designed to support data capture for research studies, providing 1) an intuitive interface for validated data entry; 2) audit trails for tracking data manipulation and export procedures; 3) automated export procedures for seamless data downloads to common statistical packages; and 4) procedures for importing data from external sources.

This vignette documents the provided data set and other utilities of this package.

2 Provided Data Sets

The *pedalfast.data* package provides the following data objects:

data(package = "pedalfast.data")$results[, c("Item", "Title")]
##      Item                 Title               
## [1,] "pedalfast"          "PEDALFAST Data"    
## [2,] "pedalfast_metadata" "PEDALFAST Metadata"

Each of these objects will be described in detail in the following sections.

The provided data sets are data.frames. Examples for working with the provided data sets will be done using base R, the tidyverse, and data.table. Click the following buttons to have the different data paradigms displayed or not while reading this vignette.

3 PEDALFAST Data

The data collected during the PEDALFAST study has been provided in two data.frames so the end user may opt into using another paradigm such as *[data.table](https://cran.r-project.org/package=data.table)* or the tidyverse. The following will focus on use of base R methods only.

Reproduction of the examples in this vignette will require the following namespaces.

library(pedalfast.data)

Load the provided data sets into the active session via data as follows.

data(pedalfast,          package = "pedalfast.data")
data(pedalfast_metadata, package = "pedalfast.data")

str(pedalfast,          max.level = 0)
## 'data.frame':    388 obs. of  103 variables:
str(pedalfast_metadata, max.level = 0)
## 'data.frame':    103 obs. of  3 variables:

The pedalfast is a data frame with each row reporting the collected data for one subject, and each column being a unique variable. The pedalfast_metadata data frame is a selection of columns from the data dictionary provided by a REDCap export of the project. In the following you will find examples of specific utilities provided in this package to make formatting the data easier.

Let’s look at the first three columns of pedalfast, and the first three rows of pedalfast_metadata.

head(pedalfast[, 1:3])
##   studyid  age female
## 1     102 1179      0
## 2     103   90      0
## 3     110 1164      1
## 4     112 1413      1
## 5     114  233      0
## 6     116 5791      0
pedalfast_metadata[1:3, ]
##   variable                        description         values
## 1  studyid               PEDALFAST Patient ID           <NA>
## 2      age Age, in days, at time of admission           <NA>
## 3   female             Is the patient female? 0, no | 1, yes

The first column of pedalfast is the studyid, and the first row of pedalfast_metadata is the documentation for the studyid. Similarly, the second column of pedalfast and second row of pedalfast_metadata are for the age of the patient. The first notable change in is in the third row of the pedalfast_metadata where the indicator for female is documented including the mapping from integer to English: 0, no | 1, yes

The rest of this section of the vignette provides details on each of the variables in the data set and provides some examples for data use.

3.1 Study ID

The PEDALFAST data was collected at multiple sites. The study id provided is a patient specific random number between 100 and 999 with no mapping to the sites. That is, you should not be able to determine which site provided a specific row of data.

variable description values
studyid PEDALFAST Patient ID
str(pedalfast$studyid)
##  int [1:388] 102 103 110 112 114 116 120 122 123 124 ...

3.2 Age

Age of the patient is reported in days.

variable description values
age Age, in days, at time of admission
summary(pedalfast$age)          # in days
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##     0.0   679.5  2508.5  2699.3  4635.5  6501.0
summary(pedalfast$age / 365.25) # in years
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.860   6.868   7.390  12.691  17.799

The PEDALFAST data has been submitted to the Federal Interagency Traumatic Brain Injury Research (FITBIR) Informatics System. As part of that submission age of the patient was to be reported as the floor of the patients age in years with the exception of those under one year of age. For those under one year of age the reported value was to be the truncated three decimal age in years. For example, a patient more than one month but less than two months would have a reported age of 0.083 (1/12), a 8 month old would have a reported age of 0.666 (8/12). Note the truncation of the decimal. If you require the same rounding scheme we have provided a function in this package round_age to provide the rounding with the truncation. The function will return age as a character by default, a numeric value will be returned when specified.

fitbir_ages <-
  data.frame(age  = pedalfast$age / 365.25,
             char = round_age(pedalfast$age / 365.25),
             num  = round_age(pedalfast$age / 365.25, type = "numeric"))

plot(x = fitbir_ages$age,
     y = fitbir_ages$num,
     xlab = "Age (years)",
     ylab = "FITBIR Age (Years)")

3.3 Female/Male

The variable female is an indicator for sex/gender. The category of female/male was made by the attending physicians or reported by the patient/caregivers. This variable was not determined by sex chromosomes genotyping. The intent was to report sex but gender, the social constructed identify of sex, might be more appropriate.

variable description values
female Is the patient female? 0, no | 1, yes
with(pedalfast, {table(female)})
## female
##   0   1 
## 239 149
with(pedalfast, {prop.table(table(female))})
## female
##         0         1 
## 0.6159794 0.3840206

3.4 Injury

Three variables related to injury. The source of information for the injury and the injury mechanism (injurymech) are both categorical variables with known values and are presented as character vectors in the pedalfast data.frame. The time from injury to admission (injurytoadmit) is reported in days, if the date of injury was known.

variable description values
sourceinj Source of Injury Information
injurytoadmit Days from injury, if known, to admission.
injurymech Injury mechanism 1, traffic | 2, fall | 3, known or suspected abuse | 4, self-harm | 9, other
summary(pedalfast[, c("sourceinj", "injurytoadmit", "injurymech")])
##   sourceinj         injurytoadmit      injurymech       
##  Length:388         Min.   :  0.000   Length:388        
##  Class :character   1st Qu.:  0.000   Class :character  
##  Mode  :character   Median :  0.000   Mode  :character  
##                     Mean   :  1.415                     
##                     3rd Qu.:  0.000                     
##                     Max.   :366.000                     
##                     NA's   :41

The injurymech is a character vector by default so the end user may build a factor as needed.

table(pedalfast$injurymech, useNA = "always")
## 
##                     Fall Known or suspected abuse                    Other 
##                       72                       91                       77 
##                Self-harm                  Traffic                     <NA> 
##                        6                      142                        0

3.5 Emergency Department

Several variables were collected in both the emergency department (ED) and the intensive care unit (ICU). The following are the notes for the variables collected in the ED.

3.5.1 GCS

The Glasgow Coma Score was assessed in one or both of the Emergency Department (ED) and the ICU. There are several variables noted here for GCS with the suffix ‘ed’ which are also reported later from the ICU with the suffix ‘icu’.

variable description values
gcsyned Was a GCS obtained in the ED? 0, no | 1, yes
gcseyeed ED GCS Eye 4, spontaneous | 3, to speech | 2, to pain only | 1, no response
gcsverbaled ED GCS Verbal 5, oriented, appropriate or coos and babbles | 4, confused or irritable cries | 3, inappropriate words or cries to pain | 2, incomprehensible sounds or moans to pain | 1, no response
gcsmotored ED GCS Motor 6, obeys commands | 5, localizes pain or withdraws to touch | 4, withdraws from painful stimuli | 3, abnormal flexion to pain | 2, abnormal extension to pain | 1, no response/flaccid
gcsed ED GCS Total [gcseyeed]+[gcsverbaled]+[gcsmotored]
gcsetted Was the patient intubated at the time of their ED GCS assessment? 0, no | 1, yes
gcsseded Was the patient sedated at the time of their ED GCS assessment? 0, no | 1, yes
gcspared Was the patient chemically paralyzed at the time of their ED GCS assessment? 0, no | 1, yes
gcseyeobed Were the patient’s eyes obscured by injury, swelling, or bandage at the time of their ED GCS assessment? 0, no | 1, yes
summary(pedalfast[, grep("^gcs.*ed$", names(pedalfast))])
##     gcsyned          gcseyeed      gcsverbaled      gcsmotored   
##  Min.   :0.0000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.0000   1st Qu.:1.000   1st Qu.:1.000