510 likes | 517 Views
Learn about designing and preprocessing M/EEG experiments, from data conversion to analysis techniques. Understand the differences between EEG and MEG, pre-processing steps, types of analysis, and sources of noise. Dive into event-related changes, oscillatory activity, and experimental design considerations.
E N D
EEG / MEG: Experimental Design & Preprocessing Alexandra Hopkins Jennifer Jung
Preprocessing in SPM12 Data Conversion Montage Mapping Epoching Downsampling Filtering Artefact Removal Referencing Outline Experimental Design • fMRI M/EEG • Analysis • Oscillatory activity • EP • Design • Inferences • Limitations • Combined Measures
MEG vs. EEG • Both EEG and MEG signals arise from direct neuronal activity • -> postsynaptic dendritic potentials • Electric field is distorted by changes in conductivity across different layers unlike magnetic field • High temporal resolution ~ms.
Sources of M/EEG signals • MEG sensors only detect tangential components of fields from cortical pyramidal neurons • Less sensitive to deeper regions • EEG signal consists of both tangential and radial components of fields gyrus sulcus
Two types of MEG/EEG analysis Event related changes (EP / ERP – ERF) Oscillatory activity – cortical rhythms (Time-frequency analysis) Time locked to stimulus Otten, L. (2012, November 21). EEG/MEG Acquisition, Analysis and Interpretation, MSc Cognitive Neuroscience, UCL
Event Related Changes pre-stim post-stim Repeats at same time Averaging evoked response When response is time locked - signal averages in!
Evoked vs. Induced Average trial by trial With jitter effect - signal averages out! (Hermann et al. 2004)
Oscillatory activity active awake state resting state falling asleep sleep deep sleep coma 50 uV 1 sec ongoing rhythms
Oscillations • Non-averaged data collected during continuous stimulation or task performance (or during rest) lends itself to analysis of spectral power. • Signals can be decomposed into a sum of pure frequency components which gives information on the signal power at each frequency. • i.e. We can do Fourier analysis and look at spectra (not-event related – break data in arbitrary segments and do some averaging
(8 – 12or 13 Hz) Cortical and behavioral deactivation or inhibition Closed eyes (12 – 30 Hz) Alert, REM sleep Attention, and higher cognitive function (30 – 80 Hz) Visual awareness Binding of information Encoding, retention and (0 – 4 Hz) Attentional and syntactic language processes Deep sleep (4 – 8 Hz) Codes locations in space, navigation Declarative/episodic memory processes Successful memory encoding
EP vs. ERP / ERF • Evoked potential (EP) • sensory processes • short latencies (< 100ms) • small amplitudes (< 1μV) • Event related potential (EEG) / event related field (ERF) • higher cognitive processes • longer latencies (100 – 600ms), • higher amplitudes (10 – 100μV) used interchangeably in general
ERP/ ERF Non-time locked activity(noise) lost via averaging over trials Averaging
Experimental design • Number of trials • EP: 120 trials, 15-20% will be excluded • Oscillatory activity: 40-50 trials • Duration of stimuli / task • Short: Averaged EP is fine • (Very) long: spectrotemporal analysis on averaged EP or non-averaged data • Collecting Behavioral Responses
Invariant patterns of neural activity from specific cognitive processes Timing of cognitive processes Degree of engagement Functional equivalence of underlying cognitive process Inferences Not Based On Prior Knowledge Observation Inference • Same ERP pattern • Timing signals • Distribution across scalp • Differences in ERP across conditions and time
Observed vs Latent Components Observed waveform Latent components OR
Design Strategies • Focus on specific, large and easily isolated component • E.g., P3, N400, LRP, N2pc… • Use well-studied experimental manipulations • Similar conditions • Component-independent experimental designs • Very hard to study anything interesting Luck, Ten Simple Rules for Designing and Interpreting ERP Experiments
Component-independent experimental designs How quickly can the visual system differentiate between different classes of object? Thorpe et al (1996)
Design Strategies • Avoid confounds and misinterpretations • Physical stimulus confounds • Side effect • What you manipulated indirectly influences other things • Vary conditions within rather than between blocks • Fatigue effect • Be cautious of behavioural confounds • Motor evoked potentials (MEPs)
Sources of Noise in M/EEG • M/EEG activity not elicited by stimuli • e.g. alpha waves → relaxed but alert • Trial-to-trial variability in the ERP components • variations in neural and cognitive activity → trial by trial consistency • Artefactual bioelectric activity • eye blinks, eye movement, cardiac and muscular activity, skin potentials → keep electrode impedances low • Environmental electrical activity • power lines, SQUID jumps, noisy, broken or saturated sensors → shielding
Signal-to-Noise Ratio • Size of the noise in average = (1/√N) ×R • Number of trials: • Large component: 30– 60 per condition • Medium component: 150– 200 per condition • Small component: 400– 800 per condition • Double with children or psychiatric patients
Limitations • Ambiguous relation between observed ERP and latent components • Signal distorted en route to scalp • arguably worse in EEG than MEG (head as “spherical conductor”) • MEG: restrictions with magnetic implants • Poor localization (cf. “inverse problem”)
Combining Techniques • Why? How? • Converging evidence, generative models • fMRI + EEG, fMRI + MEG • Drawbacks • Signal interference • Complex experimental design
Preprocessing in SPM12 Data Conversion Montage Mapping Epoching Downsampling Filtering Artefact Removal Referencing Outline Experimental Design • fMRI M/EEG • Analysis • Oscillatory activity • EP • Design • Inferences • Limitations • Combined Measures
PREPROCESSING IN SPM12 • Goal: get from raw data to averaged ERP (EEG) or ERF (MEG) using SPM12
Conversion of data • Convert data from its native machine-dependent format to MATLAB based SPM format *.mat (data) *.bdf *.bin *.eeg *.dat (other info)
Data Conversion • Define settings: • Read data as continuous or as trials (is raw data already divided into trials?) • Select channels • Define file name • ‘just read’ option is a convenient way to look at all the data quickly
Data Conversion - Example • 128 channels selected • Unusually flat because data contain very low frequencies and baseline shifts • Viewing all channels only with a low gain *.mat (data) *.dat (other info)
Downsampling • Sampling frequency is very high at acquisition (e.g. 2048 Hz) • Downsampling is required for efficient data storage • Sampling rate > 2 x highest frequency in the signal of interest = The Nyquist frequency
Aliasing Sampling below Nyquist frequency will introduce artefacts known as aliases.
Downsampling: SPM 12 Interface • Downsampling reduces the file size and speeds up the subsequent processing steps • At least 2x low pass filter • e.g. 1000 to 200 Hz.
Montaging & Referencing • Montage - representation of EEG channels • Referential montage - have a reference electrode for each channel • Identify vEOG and hEOG channels, remove several channels that don’t carry EEG data. • Specify reference for remaining channels: • Single electrode reference: free from neural activity of interest e.g. Cz • Average reference: Output of all amplifiers are summed and averaged and the averaged signal is used as a common reference for each channel, like a virtual electrode and less biased
Montage & Referencing: SPM 12 Interface Review channel mapping
Epoching Cut out chunks of continuous data (= single trials, referenced to stim onset) EEG1 EEG2 EEG3 Event 1 Event 2
Epoching • Specify time • e.g. 100 ms prestimulus - 600 ms poststimulus = single epoch/trial • Baseline-correction: automatic; mean of the pre-stimulus time is subtracted from the whole trial • Padding: adds time points before and after each • trial to avoid ‘edge effects’ when filtering
Filtering • M/EEG data consist of signal and noise • Noise of different frequency; filter it out • Any filter distorts at least some part of the signal but reduces file size • Focus on signal of interest - boost signal to noise ratio • SPM12: Butterworth filter • High-, low-, band-pass or bandstop filter
Types of Filters •High-pass – filters out low-frequency noise, removes the DC offset and slow drifts in the data e.g. sweat and non-neural physiological activity •Low-pass – remove high-frequency noise. Similar to smoothing e.g. muscle activity, neck •Notch (band-stop) – remove artefacts limited in frequency, most commonly electrical line noise and its harmonics. Usually around 50/60Hz. •Band-pass – focus on the frequency of interest and remove the rest. More suitable for relatively narrow frequency ranges.
Removing Artefacts EASY • Removal • Visual inspection - reject trials • Automatic SPM functions: • Thresholding (e.g. 200 μV) • 1st – bad channels, 2nd – bad trials • No change to data, just tagged • Robust averaging: estimates weights (0-1) indicating how artefactual a trial is
Removing Artefacts HARDER • Use your EoG! • Regress out of your signal • Use Independent Component Analysis (ICA) • Eyeblinks are very stereotyped and large • Usually 1st component