You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Use bootstrap or permutation tests for significance
578
-
- Account for unequal variance if trial counts differ
579
-
580
-
4.**Minimum trial count**: Aim for at least 30 trials per condition
581
-
- Fewer trials = noisy ERPs
582
-
- More trials = better SNR but diminishing returns beyond ~100
583
-
584
468
## Computing EMG-ERPs
585
469
470
+
**Note on trial balancing:** When comparing ERPs across conditions with different trial counts (e.g., common keys like 'e' vs rare keys like 'x'), consider randomly subsampling the higher-count condition using `pop_select(EEG, 'trial', randperm(EEG.trials, n))` to match trial counts and ensure equal signal-to-noise ratios.
471
+
586
472
EMG-ERPs are computed by averaging **envelope data** across trials:
587
473
588
474
```matlab
@@ -621,52 +507,13 @@ This figure shows EMG-ERPs for all burst-initial keystrokes, separated by hand (
621
507
622
508
**Trial selection**: Only burst-initial keystrokes (preceded by >500ms pause) are included to avoid epoch overlap from rapid typing. From approximately 4,000 total keystrokes in this recording session, the burst-initial criterion selects ~100-300 epochs per hand—sufficient for reliable EMG-ERPs while ensuring clean baselines. The exact epoch counts are shown in the figure title.
623
509
624
-
Note the **contralateral activation pattern**: left-hand keys (a, s, d, e, r, ...) show stronger activation in the left wristband (top-left), while right-hand keys (k, l, j, i, o, ...) show stronger activation in the right wristband (bottom-right). When comparing conditions with different trial counts, use random subsampling as described in the [Balancing trial counts](#balancing-trial-counts-for-fair-comparison) section above.
510
+
Note the **contralateral activation pattern**: left-hand keys (a, s, d, e, r, ...) show stronger activation in the left wristband (top-left), while right-hand keys (k, l, j, i, o, ...) show stronger activation in the right wristband (bottom-right).
625
511
626
512
**Important for EMG:**
627
513
- EEGLAB's topoplot (scalp maps) is NOT meaningful for EMG data
628
514
- Focus on channel ERPs and time-course plots
629
515
- Compare ERPs across channels on the same limb
630
516
631
-
## Comparing conditions with EEGLAB
632
-
633
-
### Comparing multiple conditions
634
-
635
-
To compare ERPs across different conditions (e.g., different keys or hands), use EEGLAB's comparison tools:
636
-
637
-
**Method 1: Overlay plots for selected channels**
638
-
639
-
```matlab
640
-
% Compare key 'a' (left hand) vs key 'k' (right hand) for specific channels
641
-
% Use EEGLAB menu: Plot > Channel ERPs > With scalp maps
642
-
% Then select specific channels and conditions
643
-
644
-
% Or from command line:
645
-
% First, select left-hand channels for key 'a'
646
-
figure; pop_plotdata(EEG_a, 1, [1 5 9], 'Key "a" - Left hand channels');
647
-
648
-
% Then, select right-hand channels for key 'k'
649
-
figure; pop_plotdata(EEG_k, 1, [17 21 25], 'Key "k" - Right hand channels');
650
-
```
651
-
652
-
**Method 2: Compare using EEGLAB's STUDY framework**
653
-
654
-
For systematic comparison across multiple subjects or conditions:
655
-
656
-
```matlab
657
-
% Create a STUDY structure with multiple datasets
658
-
% Use EEGLAB menu: File > Create study > Browse for datasets
659
-
% Then use: Study > Precompute channel measures
660
-
% Finally: Study > Plot channel measures
661
-
662
-
% This allows statistical comparison across conditions
663
-
```
664
-
665
-
**Expected patterns:**
666
-
-**Contralateral dominance**: Stronger activation in the hand performing the keystroke
667
-
-**Timing differences**: Peak latency may differ between hands
668
-
-**Amplitude differences**: May vary based on finger position and force
0 commit comments