Skip to contents

Tests whether the HEP component amplitude is larger than expected if the brain signal were not time-locked to the heartbeat, by recomputing the component amplitude for n_perm datasets with circularly shifted R-peaks.

Usage

hepSignificance(
  eeg,
  rpeaks,
  sampling_rate,
  window = c(-0.1, 0.6),
  baseline = c(-0.1, 0),
  component = c(0.2, 0.4),
  n_perm = 200
)

Arguments

eeg, rpeaks, sampling_rate, window, baseline

As in heartbeatEvokedPotential().

component

Component window in seconds (see hepAmplitude()).

n_perm

Number of permutations (default 200).

Value

A list with observed (|component amplitude|), null (permutation amplitudes), and p_value (one-sided).