Skip to content

otoolej/preterm_twins_EEG

Repository files navigation

EEG Concordance in Preterm Twins

Code for manuscript:

Lloyd RO, O'Toole JM, Livingstone V, Filan PM, Boylan GB (2021), Mathematical analysis of EEG concordance in perterm twins, Journal of Clinical Neurophysiology, 38(1), 62-68 doi:10.1097/WNP.0000000000000645

Please cite the above reference if using this code to generate new results.

All code developed in R (version 3.4.4, The R Foundation of Statistical Computing). EEG features calculated using the NEURAL (version 0.3.3, DOI, also available on github) with burst detector (version 0.1.2, DOI, also available on github). See references [1,2] for more details on these.

NB: feature set (as .csv file) will be included after publication.

Required packages

Mixed-effects models use the lme4 package (v1.1.15); also plyr (v1.8.4) is required somewhere.

If not installed, then

install.packages('lme4')
install.packages('plyr')

Load the functions

# load the functions:
source('gen_all_ICC.R')
source('gen_all_ICC_thresholds.R')
source('compare_ICCs_with_thresholds.R')

Intra-class Correlations (ICC)

Generate ICCs using linear mixed-effects models for all EEG features at all time points, including and not including gestational age, and for the 4 data sets (all twins, MCDA twins, DCDA twins, and singletons):

gen_all_ICC()

This write the ICCs to .csv files (see set_paths.R for location).

Then generate the lower-limit threshold for the ICCs, again for all features, at all time-points, including/not-including gestational age, and for the 4 data sets:

gen_all_ICC_thresholds("twins")
gen_all_ICC_thresholds("mcda")
gen_all_ICC_thresholds("dcda")
gen_all_ICC_thresholds("singletons")

WARNING: this can be slow (e.g. a couple of hours or more). Writes the ICC-thresholds to .csv files (see set_paths.R for location).

Next (optional), to test if the ICCs are significant or not, then compare to the generated threshold. To do so, load the the data from the .csv files and compare (which writes to another .csv file):

compare_ICCs_with_thresholds("twins")
compare_ICCs_with_thresholds("mcda")
compare_ICCs_with_thresholds("dcda")
compare_ICCs_with_thresholds("singletons")

Parameters for the NEURAL toolbox

Parameter values of the NEURAL toolbox used to the generate the qEEG features are listed in the file neural_parameters_TWINS.m.

Licence

Copyright (c) 2018, John M. O' Toole, University College Cork
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

  Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

  Redistributions in binary form must reproduce the above copyright notice, this
  list of conditions and the following disclaimer in the documentation and/or
  other materials provided with the distribution.

  Neither the name of the University College Cork nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

References

  1. JM O’Toole and GB Boylan (2017). NEURAL: quantitative features for newborn EEG using Matlab. ArXiv e-prints, arXiv:1704.05694.

  2. JM O' Toole, GB Boylan, RO Lloyd, RM Goulding, S Vanhatalo, and NJ Stevenson, Detecting Bursts in the EEG of Very and Extremely Premature Infants Using a Multi-Feature Approach, Medical Engineering & Physics, vol. 45, pp. 42-50, 2017. doi:10.1016/j.medengphy.2017.04.003

Contact

John M. O' Toole

Neonatal Brain Research Group,
INFANT: Irish Centre for Fetal and Neonatal Translational Research,
Department of Paediatrics and Child Health,
Room 2.19 UCC Paediatric Academic Unit, Cork University Hospital,
University College Cork,
Ireland

  • email: j.otoole AT ieee.org