[Eeglablist] t and f-values from STUDY

embar at super.lt embar at super.lt
Fri Jan 10 23:32:58 PST 2014


Hi,

I worked to export p-values after comparing spectral power with
std_specplot. To see your used functions, open ALLCOM variable in MATLAB.

% To obtain "exact" p-values, write in MATLAB window:

STUDY = pop_statparams(STUDY, 'condstats','on', 'alpha',NaN);

% As EEGLAB don't save values to variables after some functions, like
% displaying EEG power spectrum comparison plot, you must assign them:
% Try export statistics to variables: pgroup pcond pinter
% by adding "[STUDY specdata specfreqs pgroup pcond pinter] = "

STUDY = pop_specparams(STUDY, 'topofreq', [8 13] );
STUDY = pop_specparams(STUDY, 'freqrange',[1 45] );[STUDY specdata
specfreqs pgroup pcond pinter] =
std_specplot(STUDY,ALLEEG,'channels',{'Fp1' 'Fpz' 'Fp2' 'F3' 'Fz' 'F4'
'FC5' 'FC1' 'FC2' 'FC6' 'C3' 'Cz' 'C4' 'CP5' 'CP1' 'CP2' 'CP6' 'P3' 'Pz'
'P4' 'POz' 'O1' 'Oz' 'O2' 'AF3' 'AF4' 'F5' 'F1' 'F2' 'F6' 'FC3' 'FCz'
'FC4' 'C5' 'C1' 'C2' 'C6' 'CP3' 'CPz' 'CP4' 'P5' 'P1' 'P2' 'P6' 'PO5'
'PO3' 'PO4' 'PO6'});

% Export p-values (compared between conditions) to Excel:

xlswrite('Common.xls',{'Frequency'}, 'Common.pcond', 'A1');
xlswrite('Common.xls', transpose(specfreqs), 'Common.pcond', 'A3');
n_of_channels = length(STUDY.changrp);
clearvars table_of_freq;
for k=1:n_of_channels ;
  table_of_freq{1,k}=STUDY.changrp(1,k).name;
end ;
xlswrite('Common.xls', table_of_freq, 'Common.pcond', 'C1');
xlswrite('Common.xls', pcond{1,1}, 'Common.pcond', 'C3');


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% If you have more complex STUDY design.
%
% Comparisons in groups and between groups:
%

clearvars specdata specfreqs pgroup pcond pinter;

STUDY = pop_statparams(STUDY,
'groupstats','on','mcorrect','bonferoni','alpha',NaN); STUDY =
pop_specparams(STUDY, 'freqrange',[1 45] ); [STUDY specdata specfreqs
pgroup pcond pinter] = std_specplot(STUDY,ALLEEG,'channels',{'Fp1' 'Fpz'
'Fp2' 'F3' 'Fz' 'F4' 'FC5' 'FC1' 'FC2' 'FC6' 'C3' 'Cz' 'C4' 'CP5' 'CP1'
'CP2' 'CP6' 'P3' 'Pz' 'P4' 'POz' 'O1' 'Oz' 'O2' 'AF3' 'AF4' 'F5' 'F1' 'F2'
'F6' 'FC3' 'FCz' 'FC4' 'C5' 'C1' 'C2' 'C6' 'CP3' 'CPz' 'CP4' 'P5' 'P1'
'P2' 'P6' 'PO5' 'PO3' 'PO4' 'PO6'});

%Export p-values to Excel:

for grupe=1:length(STUDY.group) ;
  xlswrite('Common.xls',{'Frequency'}, ([STUDY.group{1,grupe} '.pcond']),
'A1');
  xlswrite('Common.xls', transpose(specfreqs), ([STUDY.group{1,grupe}
'.pcond']), 'A3');
  n_of_channels = length(STUDY.changrp);
  clearvars table_of_freq;
  for k=1:n_of_channels ;
    table_of_freq{1,k}=STUDY.changrp(1,k).name;
  end ;
  xlswrite('Common.xls', table_of_freq, ([STUDY.group{1,grupe} '.pcond']),
'C1');
  xlswrite('Common.xls', pcond{1,grupe}, ([STUDY.group{1,grupe}
'.pcond']), 'C3');
end


for condit=1:length(STUDY.condition) ;
  xlswrite('Common.xls',{'Frequency'}, ([STUDY.condition{1,condit}
'.pgroup']), 'A1');
  xlswrite('Common.xls', transpose(specfreqs), ([STUDY.condition{1,condit}
'.pgroup']), 'A3');
  n_of_channels = length(STUDY.changrp);
  clearvars table_of_freq;
  for k=1:n_of_channels ;
    table_of_freq{1,k}=STUDY.changrp(1,k).name;
  end ;
  xlswrite('Common.xls', table_of_freq, ([STUDY.condition{1,condit}
'.pgroup']), 'C1');
  xlswrite('Common.xls', pgroup{1,condit}, ([STUDY.condition{1,condit}
'.pgroup']), 'C3');
end



Maybe this can somehow help...

Regards,
Mindaugas

> Dear Bastien,
>
>> Can someone suggest how to retrieve the t, f, and p values from a test
> ran from the GUI?
>
> Sorry but you most likely can't get these values from the GUI.
>
> As I suggested in my previous reply to you I recommend you access to STUDY
> and use statcond() to obtain t/F-scores.
>
> Makoto
>
> 2014/1/8 Bastien Boutonnet <bastien.b1 at gmail.com>
>
>> Dear all,
>>
>> Since my last post I have been desperately looking for a way to access
>> the
>> outputs from the stats performed in the Study GUI. I found some
>> suggestions
>> to use std_stat() but I fail to use it successfully. There doesn’t seem
>> to
>> be a way to find how it is actually generated and the help file about
>> the
>> function is not helpful as I run into all sorts of errors that are due
>> to
>> problems with the array inputs I believe.
>>
>> Can someone suggest how to retrieve the t, f, and p values from a test
>> ran
>> from the GUI?
>>
>> If the only way is via the command line how can I write it correctly for
>> the following design:
>>
>> Single Set study selecting epochs labeled two fields IV1 (1,2) IV2 (a,b)
>> Carry paired stats on each levels of each IVs + interactions.
>>
>> I would like to obtain the statistics and p-values.
>>
>> Thanks :)
>>
>> B
>>
>> --
>> Bastien Boutonnet, Ph.D.
>> School of Psychology,
>> Bangor University
>> bastienboutonnet.com
>>
>> _______________________________________________
>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>> To unsubscribe, send an empty email to
>> eeglablist-unsubscribe at sccn.ucsd.edu
>> For digest mode, send an email with the subject "set digest mime" to
>> eeglablist-request at sccn.ucsd.edu
>>
>
>
>
> --
> Makoto Miyakoshi
> Swartz Center for Computational Neuroscience
> Institute for Neural Computation, University of California San Diego
>





More information about the eeglablist mailing list