<HTML>
<HEAD>
<TITLE>Re: comparing condition and group ERP's from a STUDY</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Dear Hamish,<BR>
<BR>
I have been running into the same problem as yours.  I also noticed that the number of subjects you have in each group is different (this was also my case).  I have run a test with same number of subjects in both groups (for tutorial data and my own data), and plotting ERP data works.  However,  when a run my data with different number of subjects in each group, I get the same problem you described.  Plotting ERSP and ITC should work fine with different number of subjects per group, but plotting ERP and Spectra results don’t.<BR>
<BR>
Eduardo Vianna, PhD<BR>
Center for Neurobiology of Stress<BR>
Division of Digestive Diseases<BR>
University of California, Los Angeles<BR>
10945 Le Conte Ave., Ste 2338C<BR>
Los Angeles, CA 90095<BR>
<BR>
<BR>
On 10/19/08 6:06 PM, "Hamish INNES-BROWN" <<a href="HINNES-BROWN@bionicear.org">HINNES-BROWN@bionicear.org</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT COLOR="#0000FF"><FONT FACE="Arial">Hi Arno, thanks for your reply.<BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#0000FF"><FONT FACE="Arial">The weird thing is, I'm certain that all your points below are true.  Both conditions are present in all subjects, and the group really is a group (ie groups '1' and '2' have different subjects - children vs adults, and are not ways to sneak in extra conditions).<BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#0000FF"><FONT FACE="Arial">Just to be sure, I wrote a short script to save the EEG.setnames, EEG.group, EEG.condition, EEG.ntrials, pnts, srate, xmin and xmax for all the sets in the Study to a csv file, and all was correct.<BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#0000FF"><FONT FACE="Andale Mono">% script for extracting the number of trials of each stimulus, for each<BR>
% subject in a STUDY.<BR>
%STUDY must be currently open<BR>
% loop over sets in study.<BR>
</FONT></FONT><FONT COLOR="#228B22"><FONT FACE="Arial"> <BR>
</FONT></FONT><FONT COLOR="#0000FF"><FONT FACE="Andale Mono">nsets = size(STUDY.datasetinfo,2)<BR>
</FONT><FONT FACE="Arial"> <BR>
</FONT><FONT FACE="Andale Mono">%make an empty matrix to fill up with the data<BR>
%rows = sets<BR>
output = zeros(nsets, 8);<BR>
</FONT><FONT FACE="Arial"> <BR>
</FONT><FONT FACE="Andale Mono">for</FONT></FONT><FONT FACE="Andale Mono"> currentset = 1:nsets;<BR>
<FONT COLOR="#0000FF">    csetname = EEG(currentset).setname;<BR>
    ID = str2num(csetname(2:4));<BR>
    output(currentset,1) = ID;<BR>
    output(currentset,2) = str2num(EEG(currentset).group) ;<BR>
    output(currentset,3) = str2num(EEG(currentset).condition);<BR>
    output(currentset,4) = EEG(currentset).trials ;<BR>
    output(currentset,5) = EEG(currentset).pnts ;<BR>
    output(currentset,6) = EEG(currentset).srate ;<BR>
    output(currentset,7) = EEG(currentset).xmin ;<BR>
    output(currentset,8) = EEG(currentset).xmax ;<BR>
end<BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#0000FF"><FONT FACE="Arial">Results here if interested <a href="http://spreadsheets.google.com/ccc?key=pMWrciDbEoFRAgnrYtXy9MQ">http://spreadsheets.google.com/ccc?key=pMWrciDbEoFRAgnrYtXy9MQ</a> <<a href="http://spreadsheets.google.com/ccc?key=pMWrciDbEoFRAgnrYtXy9MQ&inv=hinnesbrown@gmail.com&t=4926724069117154563&guest">http://spreadsheets.google.com/ccc?key=pMWrciDbEoFRAgnrYtXy9MQ&inv=hinnesbrown@gmail.com&t=4926724069117154563&guest</a>> <BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#0000FF"><FONT FACE="Arial">The other weird thing is that every other plotting button works perfectly well, I can see Spect, ERSP, and ITC plots for both conditions and groups, which makes me think the data must be OK, as I guess all these measures are being calculated from the same data..?<BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
 <BR>
</FONT><FONT COLOR="#0000FF"><FONT FACE="Arial">And all the electrodes are interpolated - I ended up using v6.01 just to do the electrode interpolation, then switching back to 6.03b(oct2008) to pre-calc all the channel measures.  Selecting the individual setfiles and plotting ERP's also works fine, for both groups and condition types, so I dont think the data is missing or wrongly arranged.  Any other hints?<BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#0000FF"><FONT FACE="Arial">Many thanks!<BR>
</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
 <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic"><B>Hamish Innes-Brown</B></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">Senior Research Officer</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
<BR>
</FONT><FONT COLOR="#33CCCC"><FONT FACE="Century Gothic">The Bionic Ear Institute</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">Auditory Clinical Neuroscience Unit</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">c/o St Vincents Hospital</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">6th Floor Daly Wing,</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">35 Victoria Pde, Fitzroy Vic 3065</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">Tel: +61 3 9288 3523</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">Fax: +61 3 6997 7518</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
<BR>
 <BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="100%"></FONT><FONT FACE="Tahoma, Verdana, Helvetica, Arial"><B>From:</B> <a href="eeglablist-bounces@sccn.ucsd.edu">eeglablist-bounces@sccn.ucsd.edu</a> [<a href="mailto:eeglablist-bounces@sccn.ucsd.edu">mailto:eeglablist-bounces@sccn.ucsd.edu</a>] <B>On Behalf Of </B>arno delorme<BR>
<B>Sent:</B> Saturday, 18 October 2008 9:58 PM<BR>
<B>To:</B> Hamish INNES-BROWN<BR>
<B>Cc:</B> <a href="eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a><BR>
<B>Subject:</B> Re: [Eeglablist] comparing condition and group ERP's from a STUDY<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
Dear Hamish, <BR>
<BR>
some more information about groups and conditions. Optimally:<BR>
<BR>
- All conditions are supposed to be present in all subjects. If not, the program should still work but might lead to the empty plots you are seeing them right now.<BR>
- Groups are supposed to be for different subjects or different sessions (different ICA decomposition for sure). Using groups within the same subjects (to define a second condition) might work but not always. This is pushing the limits of the program.<BR>
- You should interpolate missing electrodes. Once more, if you do not do that, the program should work but the average will take into account different subjects at each channel location.<BR>
<BR>
We are working on these limitations. You will be able to select several conditions and/or groups. <BR>
<BR>
Best,<BR>
<BR>
Arno<BR>
<BR>
On 14 oct. 08, at 07:35, Hamish INNES-BROWN wrote:<BR>
<BR>
</FONT></SPAN><BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
 <BR>
<BR>
</FONT><FONT FACE="Arial">Hi EEGLAB list.</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
 <BR>
<BR>
</FONT><FONT FACE="Arial">I'm currently trying to track down the source of a  problem i have plotting condition and group ERP's from the STUDY channel  measures menu.<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
<BR>
</FONT><FONT FACE="Arial">I have all the 'group' and 'condition' data loaded  into the EEG.group and EEG.condition.  The correct group and condition  numbers pop up in the study info window when all the subjects are loaded into  the study..  In EEG.group and EEG.condition the values are strings (but  numerals).  I have groups '1' and '2', and conditions '111' and  '122'.<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
<BR>
</FONT><FONT FACE="Arial">The study looks like this</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">>> STUDY</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">STUDY =  <BR>
           name:  'Study1'</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">    datasetinfo:  [1x58 struct]</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">        cluster: [1x1 struct]</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">  <BR>
</FONT><FONT FACE="Arial">         changrp: [1x63 struct]</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">           task:  ''</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">          notes: ''</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">  <BR>
</FONT><FONT FACE="Arial">       filename:  'STUDY_ALL.study'</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">       filepath:  'D:\_PROJECTS\_FB\_ANALYSIS\__EEGLAB\SET\08STUDY_ALL\'</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">        history: [1x3126  char]</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">        subject: {1x29 cell}</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">  <BR>
</FONT><FONT FACE="Arial">          group:  {'1'  '2'}</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">        session: []</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">      condition: {'111'   '122'}</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">         setind: [2x29  double]</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">            etc:  [1x1 struct]</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">       preclust: [1x1 struct]</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">  <BR>
</FONT><FONT FACE="Arial">          saved:  'yes'</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
 <BR>
<BR>
</FONT><FONT FACE="Arial">Now, when plotting the channel measures, I select  "plot conditions on the same panel", and get two plots as expected.  The  first (group '1') has two lines, as expected.  One is labelled '111' and  the other '122'. All OK.  However underneath there is an empty plot,  labelled '2', but with no lines.<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
<BR>
</FONT><FONT FACE="Arial">I thought this might be somehow a fault in my data  or the way the conditions and groups are entered (maybe they should be  numbers, not strings?) so I tried loading the example data (5subjects.zip),  and added a group variable.  Same problem however.<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
 <BR>
<BR>
</FONT><FONT FACE="Arial">Anyone had any luck with this before?</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
 <BR>
<BR>
</FONT><FONT FACE="Arial">Many thanks</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
<BR>
<BR>
<BR>
 <BR>
<BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic"><B>Hamish Innes-Brown</B></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">  <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">Senior Research Officer</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">  <BR>
 <BR>
<BR>
</FONT><FONT COLOR="#33CCCC"><FONT FACE="Century Gothic">The Bionic Ear Institute</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">  <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">Auditory Clinical Neuroscience  Unit</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">c/o St Vincents  Hospital</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">6th  Floor Daly Wing,</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">35  Victoria Pde, Fitzroy Vic 3065</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">Tel: +61 3 9288 3523</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT COLOR="#808080"><FONT FACE="Century Gothic">Fax: +61 3 6997 7518</FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">  <BR>
_______________________________________________<BR>
Eeglablist page:  <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><BR>
To  unsubscribe, send an empty email to <a href="eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><BR>
For  digest mode, send an email with the subject "set digest mime" to <a href="eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><BR>
</FONT></SPAN></BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
<BR>
</FONT></SPAN></BLOCKQUOTE>
</BODY>
</HTML>