For each EEG channel, fits a multiple linear regression on all EOG reference channels and subtracts the fitted EOG component, leaving the residual as the cleaned signal. This removes both transient blink artefacts and slow ocular drift without requiring blink event detection.
Arguments
- psg
An
mrpheus_psgobject fromprepare_psg().- eog_channels
Character vector. EOG channel labels to use as regressors. If
NULL(default), all channels of type"EOG"inpsg$channel_mapare used.- eeg_channels
Character vector. EEG channel labels to clean. If
NULL(default), all non-bad"EEG"channels are used.- verbose
Logical. Print progress messages. Default
TRUE.
Value
A new mrpheus_psg with cleaned EEG signals and re-segmented
epochs. EOG and other channels are unchanged.
Details
This is the pure-R equivalent of MNE's compute_proj_eog() / SSP
projection pipeline. Both approaches project out the subspace spanned by
the EOG channels; regression does so directly on the continuous signal.
Examples
if (FALSE) { # \dontrun{
rec <- read_edf("psg.edf")
psg <- prepare_psg(rec) |> preprocess_psg()
clean <- correct_eog_regression(psg)
} # }