<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Steve,<br>
    <br>
    Yes, ICA training on 1 Hz hp filtered data and applying the weights
    to the unfiltered data was my suggestions (and has been used in
    Scott's lab for many years, I believe). After playing a lot with
    preprocessing we found this to work best as well. The ML code below
    shows a typical preprocessing example implementing this. Note that,
    due to the HP filter, there is no real benefit in baseline
    correction of the dummy epochs. The rationale for this code, as well
    as a more general introduction into the analysis of multi-channel
    EEG data with ICA (inlcuding other assumptions and relazted
    preprocessing issues), is descriped in our EEG-fMRI book in chapter
    3.1.:<br>
    <br>
    Debener et al., (2010). Using ICA for the analysis of mutli-channel
    EEG data. In: Ullsperger & Debener (Eds.). Simultaneous EEG and
    fMRI: recording, analysis, and application (pp. 121-133). Oxford
    University Press. <br>
    <br>
    Feel free to cite this chapter when you use the code below.<br>
    <br>
    Thanks,<br>
    Stefan<br>
    <br>
    Ps: Sara, on the issue of filtering and ERPs, you should test the
    effect of the filter, by plotting an overlay of the filtered and
    unfiltered ERPs. This, of course, should be done on single subject
    ERPs, as the grand average sometimes acts as a(nother) filter. <br>
    <br>
    <br>
    <br>
    -----------------------------------------------------------------<br>
    % miu_inside_ana03.m<br>
    % sd<br>
    %<br>
    % ica on cnt data<br>
    % ----------------------------------------------------------------<br>
    <br>
    MAINPATH = '/data/sd_miu/pilot_inside/';<br>
    PATHIN = [MAINPATH, 'data/ana02/'];<br>
    PATHOUT = [MAINPATH, 'data/ana03/'];<br>
    SUBJ = {'4102', '4103new', '4105', '4106'};   <br>
    HPF = 1;                 % high pass filter for ica training only<br>
    DIM = 63;               % ica dimensionality<br>
    EPOCHDUR = 1;      % epoch duration in seconds for pruning<br>
    THRES = 4;             % SD cut-off for rejection <br>
    <br>
    for s = 1:length(SUBJ)<br>
    [ALLEEG EEG CURRENTSET ALLCOM] = eeglab;<br>
    EEG = pop_loadset('filename', [SUBJ{s}, '_bcgrem.set'], 'filepath',
    PATHIN);<br>
    <br>
    % high pass filter<br>
    EEG = pop_iirfilt(EEG, HPF, 0, [], [0]);<br>
    <br>
    % dummy trigger for epoching <br>
    for i=1:(EEG.srate*EPOCHDUR):EEG.pnts<br>
        EEG.event(end+1).type = 'S999';<br>
        EEG.event(end).latency = i;<br>
    end<br>
    EEG = eeg_checkset(EEG);<br>
    %eeg_eventtypes(EEG)<br>
    <br>
    % epoching and pruning<br>
    EEG = pop_epoch(EEG, {'S999'}, [0 EPOCHDUR], 'newname', 'tmp
    epochs', 'epochinfo', 'yes');<br>
    EEG = pop_jointprob(EEG,1,[1:63] ,THRES, THRES,0,0);<br>
    EEG = pop_rejkurt(EEG,1,[1:63] ,THRES, THRES,0,0);<br>
    EEG = eeg_rejsuperpose(EEG, 1, 1, 1, 1, 1, 1, 1, 1);<br>
    EEG = pop_rejepoch(EEG, EEG.reject.rejglobal ,0);<br>
    <br>
    % ICA<br>
    EEG = pop_runica(EEG, 'icatype','runica','dataset',1,'options',
    {'extended' 1, 'pca' DIM },'chanind',[1:63]);<br>
    <br>
    TMP.icawinv = EEG.icawinv;<br>
    TMP.icasphere = EEG.icasphere;<br>
    TMP.icaweights = EEG.icaweights;<br>
    TMP.icachansind = EEG.icachansind;<br>
    <br>
    % apply to cnt dataset<br>
    clear EEG;<br>
    EEG = pop_loadset('filename', [SUBJ{s}, '_bcgrem.set'], 'filepath',
    PATHIN);<br>
    EEG.icawinv = TMP.icawinv;<br>
    EEG.icasphere = TMP.icasphere;<br>
    EEG.icaweights = TMP.icaweights;<br>
    EEG.icachansind = TMP.icachansind;<br>
    clear TMP;<br>
    EEG = pop_saveset(EEG, 'filename',[SUBJ{s}, '_cnt.set'],
    'filepath',PATHOUT);<br>
    [ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG, 0);<br>
    <br>
    end<br>
    eeglab redraw;<br>
    <br>
    ----------------------------------------<br>
    <br>
    <br>
    Am 10/13/11 6:09 PM, schrieb Steve Luck:
    <blockquote
      cite="mid:800D0ADC-274D-401F-8705-D1469236B295@ucdavis.edu"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      Hi Sara.  Unless you care about frequencies per se, epoching and
      baseline-correcting the data won't be a problem.  From a
      time-domain perspective, this won't change anything.
      <div><br>
      </div>
      <div>BTW, someone else suggested using the 1-Hz high-pass cutoff,
        performing ICA, and then applying the component coefficients to
        the unfiltered data.  That sounds like a great suggestion,
        although I don't know if there is a technical reason why it
        wouldn't work.  Does anyone out there know if there would be a
        problem with this?</div>
      <div><br>
      </div>
      <div>Steve</div>
      <div><br>
      </div>
      <div>ps- The email trail on this topic has gotten out of hand, so
        I deleted everything except the most recent message and your
        original message.</div>
      <div><br>
        <div>
          <div>On Oct 13, 2011, at 7:20 AM, Sara Graziadio wrote:</div>
          <br class="Apple-interchange-newline">
          <blockquote type="cite">
            <div>Steve,<br>
              actually I was refering to your book when I was writing
              that the filter would deforme/reduce the erp. But
              following David Groppe's suggestion would mean to reduce
              activity at different frequency all across the spectrum,
              wihtout exactly knowing which frequencies I am reducing,
              am I right? If I want to look at the psd as well as at the
              erps, would this analysis just be correct? I am always
              concerned about applying data modification that I cannot
              fully control..if you know what I mean...<br>
              Thank you very much<br>
              Best<br>
              <br>
              Sara<br>
            </div>
          </blockquote>
        </div>
        <div><br>
        </div>
        <blockquote type="cite">On Wed, Oct 5, 2011 at 10:46 AM, Sara
          Graziadio<br>
          <<a moz-do-not-send="true"
            href="mailto:sara.graziadio@newcastle.ac.uk">sara.graziadio@newcastle.ac.uk</a>>
          wrote:<br>
          Hello,<br>
          I would like just a suggestion about some data
          cleaning/analysis I am doing. I<br>
          am doing an ERP analysis and I want to clean my data first
          with the ICA. In<br>
          theory, though, I should not use an high-pass cutoff higher
          than 0.1 Hz to not<br>
          reduce the erp amplitude. On the other side the ICA does not
          work well if the<br>
          high-pass cutoff is lower than 0.5 Hz...what is then the best
          method to apply?<br>
          Has anybody tested how robust the ica is with a 0.1Hz filter?<br>
          I have also another question: I am doing the analysis on 94
          electrodes<br>
          referenced to Fz. I planned to average reference the data but
          actually there is<br>
          quite a large spread of noise on all the electrodes with this
          method (muscular<br>
          artefacts for example from the temporal electrodes). But
          actually almost all<br>
          the papers are using the average reference so I was surprised,
          am I the only<br>
          one having this problem of noise? Would not be better just to
          keep the Fz<br>
          reference and then perhaps to average the erps for every
          different cortical<br>
          area and do the analysis on these averaged erps?<br>
          <br>
          Thank you very much<br>
          <br>
          Best wishes<br>
          <br>
          Sara Graziadio<br>
          Research Associate<br>
          Newcastle University<br>
        </blockquote>
        <br>
        <div>
          <span class="Apple-style-span" style="border-collapse:
            separate; color: rgb(0, 0, 0); font-family: Helvetica;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
            -webkit-border-vertical-spacing: 0px;
            -webkit-text-decorations-in-effect: none;
            -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
            0px; font-size: medium; "><span class="Apple-style-span"
              style="border-collapse: separate; color: rgb(0, 0, 0);
              font-family: Helvetica; font-style: normal; font-variant:
              normal; font-weight: normal; letter-spacing: normal;
              line-height: normal; orphans: 2; text-indent: 0px;
              text-transform: none; white-space: normal; widows: 2;
              word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
              -webkit-border-vertical-spacing: 0px;
              -webkit-text-decorations-in-effect: none;
              -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
              0px; font-size: medium; ">
              <div style="word-wrap: break-word; -webkit-nbsp-mode:
                space; -webkit-line-break: after-white-space; ">
                <div>
                  <div style="word-wrap: break-word; -webkit-nbsp-mode:
                    space; -webkit-line-break: after-white-space; "><span
                      class="Apple-style-span" style="border-collapse:
                      separate; color: rgb(0, 0, 0); font-family:
                      Helvetica; font-style: normal; font-variant:
                      normal; font-weight: normal; letter-spacing:
                      normal; line-height: normal; orphans: 2;
                      text-indent: 0px; text-transform: none;
                      white-space: normal; widows: 2; word-spacing: 0px;
                      -webkit-border-horizontal-spacing: 0px;
                      -webkit-border-vertical-spacing: 0px;
                      -webkit-text-decorations-in-effect: none;
                      -webkit-text-size-adjust: auto;
                      -webkit-text-stroke-width: 0px; font-size: medium;
                      ">
                      <div style="word-wrap: break-word;
                        -webkit-nbsp-mode: space; -webkit-line-break:
                        after-white-space; "><span
                          class="Apple-style-span"
                          style="border-collapse: separate; color:
                          rgb(0, 0, 0); font-family: Helvetica;
                          font-style: normal; font-variant: normal;
                          font-weight: normal; letter-spacing: normal;
                          line-height: normal; orphans: 2; text-indent:
                          0px; text-transform: none; white-space:
                          normal; widows: 2; word-spacing: 0px;
                          -webkit-border-horizontal-spacing: 0px;
                          -webkit-border-vertical-spacing: 0px;
                          -webkit-text-decorations-in-effect: none;
                          -webkit-text-size-adjust: auto;
                          -webkit-text-stroke-width: 0px; font-size:
                          medium; ">
                          <div style="word-wrap: break-word;
                            -webkit-nbsp-mode: space;
                            -webkit-line-break: after-white-space; "><span
                              class="Apple-style-span"
                              style="border-collapse: separate; color:
                              rgb(0, 0, 0); font-family: Helvetica;
                              font-size: medium; font-style: normal;
                              font-variant: normal; font-weight: normal;
                              letter-spacing: normal; line-height:
                              normal; orphans: 2; text-indent: 0px;
                              text-transform: none; white-space: normal;
                              widows: 2; word-spacing: 0px;
                              -webkit-border-horizontal-spacing: 0px;
                              -webkit-border-vertical-spacing: 0px;
                              -webkit-text-decorations-in-effect: none;
                              -webkit-text-size-adjust: auto;
                              -webkit-text-stroke-width: 0px; ">
                              <div style="word-wrap: break-word;
                                -webkit-nbsp-mode: space;
                                -webkit-line-break: after-white-space; "><span
                                  class="Apple-style-span"
                                  style="border-collapse: separate;
                                  color: rgb(0, 0, 0); font-family:
                                  Helvetica; font-size: medium;
                                  font-style: normal; font-variant:
                                  normal; font-weight: normal;
                                  letter-spacing: normal; line-height:
                                  normal; orphans: 2; text-indent: 0px;
                                  text-transform: none; white-space:
                                  normal; widows: 2; word-spacing: 0px;
                                  -webkit-border-horizontal-spacing:
                                  0px; -webkit-border-vertical-spacing:
                                  0px;
                                  -webkit-text-decorations-in-effect:
                                  none; -webkit-text-size-adjust: auto;
                                  -webkit-text-stroke-width: 0px; ">
                                  <div style="word-wrap: break-word;
                                    -webkit-nbsp-mode: space;
                                    -webkit-line-break:
                                    after-white-space; "><span
                                      class="Apple-style-span"
                                      style="border-collapse: separate;
                                      color: rgb(0, 0, 0); font-family:
                                      Helvetica; font-size: medium;
                                      font-style: normal; font-variant:
                                      normal; font-weight: normal;
                                      letter-spacing: normal;
                                      line-height: normal; orphans: 2;
                                      text-indent: 0px; text-transform:
                                      none; white-space: normal; widows:
                                      2; word-spacing: 0px;
                                      -webkit-border-horizontal-spacing:
                                      0px;
                                      -webkit-border-vertical-spacing:
                                      0px;
                                      -webkit-text-decorations-in-effect:
                                      none; -webkit-text-size-adjust:
                                      auto; -webkit-text-stroke-width:
                                      0px; ">
                                      <div style="word-wrap: break-word;
                                        -webkit-nbsp-mode: space;
                                        -webkit-line-break:
                                        after-white-space; "><span
                                          class="Apple-style-span"
                                          style="border-collapse:
                                          separate; color: rgb(0, 0, 0);
                                          font-family: Helvetica;
                                          font-size: 12px; font-style:
                                          normal; font-variant: normal;
                                          font-weight: normal;
                                          letter-spacing: normal;
                                          line-height: normal; orphans:
                                          2; text-indent: 0px;
                                          text-transform: none;
                                          white-space: normal; widows:
                                          2; word-spacing: 0px;
                                          -webkit-border-horizontal-spacing:
                                          0px;
                                          -webkit-border-vertical-spacing:
                                          0px;
                                          -webkit-text-decorations-in-effect:
                                          none;
                                          -webkit-text-size-adjust:
                                          auto;
                                          -webkit-text-stroke-width:
                                          0px; ">
                                          <div style="word-wrap:
                                            break-word;
                                            -webkit-nbsp-mode: space;
                                            -webkit-line-break:
                                            after-white-space; "><span
                                              class="Apple-style-span"
                                              style="border-collapse:
                                              separate;
                                              -webkit-border-horizontal-spacing:
                                              0px;
                                              -webkit-border-vertical-spacing:
                                              0px; color: rgb(0, 0, 0);
                                              font-family: Helvetica;
                                              font-size: 12px;
                                              font-style: normal;
                                              font-variant: normal;
                                              font-weight: normal;
                                              letter-spacing: normal;
                                              line-height: normal;
                                              -webkit-text-decorations-in-effect:
                                              none; text-indent: 0px;
                                              -webkit-text-size-adjust:
                                              auto; text-transform:
                                              none; orphans: 2;
                                              white-space: normal;
                                              widows: 2; word-spacing:
                                              0px; ">
                                              <div style="word-wrap:
                                                break-word;
                                                -webkit-nbsp-mode:
                                                space;
                                                -webkit-line-break:
                                                after-white-space; "><span
class="Apple-style-span" style="border-collapse: separate;
                                                  -webkit-border-horizontal-spacing:
                                                  0px;
                                                  -webkit-border-vertical-spacing:
                                                  0px; color: rgb(0, 0,
                                                  0); font-family:
                                                  Helvetica; font-size:
                                                  12px; font-style:
                                                  normal; font-variant:
                                                  normal; font-weight:
                                                  normal;
                                                  letter-spacing:
                                                  normal; line-height:
                                                  normal;
                                                  -webkit-text-decorations-in-effect:
                                                  none; text-indent:
                                                  0px;
                                                  -webkit-text-size-adjust:
                                                  auto; text-transform:
                                                  none; orphans: 2;
                                                  white-space: normal;
                                                  widows: 2;
                                                  word-spacing: 0px; ">
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">--------------------------------------------------------------------</div>
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">Steven J.
                                                    Luck, Ph.D.</div>
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">Director,
                                                    Center for Mind
                                                    & Brain</div>
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">Professor,
                                                    Department of
                                                    Psychology</div>
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">University of
                                                    California, Davis</div>
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">Room 109</div>
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">267 Cousteau
                                                    Place</div>
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">Davis, CA
                                                    95618</div>
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">(530)
                                                    297-4424</div>
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">E-Mail: <a
                                                      moz-do-not-send="true"
href="mailto:sjluck@ucdavis.edu">sjluck@ucdavis.edu</a></div>
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">Web: <a
                                                      moz-do-not-send="true"
href="http://mindbrain.ucdavis.edu/people/sjluck">http://mindbrain.ucdavis.edu/people/sjluck</a></div>
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">Calendar: <a
moz-do-not-send="true"
href="http://www.google.com/calendar/embed?src=stevenjluck@gmail.com&ctz=America/Los_Angeles">http://www.google.com/calendar/embed?src=stevenjluck%40gmail.com&ctz=America/Los_Angeles</a></div>
                                                  <div
                                                    style="margin-top:
                                                    0px; margin-right:
                                                    0px; margin-bottom:
                                                    0px; margin-left:
                                                    0px; ">--------------------------------------------------------------------</div>
                                                  <br
                                                    class="Apple-interchange-newline">
                                                </span></div>
                                            </span></div>
                                        </span><br
                                          class="Apple-interchange-newline">
                                      </div>
                                    </span><br
                                      class="Apple-interchange-newline">
                                  </div>
                                </span><br
                                  class="Apple-interchange-newline">
                              </div>
                            </span><br class="Apple-interchange-newline">
                          </div>
                        </span><br class="Apple-interchange-newline">
                      </div>
                    </span><br class="Apple-interchange-newline">
                  </div>
                  <br class="Apple-interchange-newline">
                </div>
              </div>
            </span></span><br class="Apple-interchange-newline">
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Eeglablist page: <a class="moz-txt-link-freetext" href="http://sccn.ucsd.edu/eeglab/eeglabmail.html">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a>
To unsubscribe, send an empty email to <a class="moz-txt-link-abbreviated" href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a>
For digest mode, send an email with the subject "set digest mime" to <a class="moz-txt-link-abbreviated" href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Prof. Dr. Stefan Debener
Neuropsychology Lab
Department of Psychology
University of Oldenburg
D-26111 Oldenburg
Germany

Office: A7 0-038
Phone: +49-441-798-4271
Fax:   +49-441-798-5522
Email: <a class="moz-txt-link-abbreviated" href="mailto:stefan.debener@uni-oldenburg.de">stefan.debener@uni-oldenburg.de</a>
</pre>
  </body>
</html>