Attachment 'anova_tutorial.m'
Download 1 % ANOVA tutorial
2
3 % Load ERP data
4 l=load([DATA_DIR 'results/studies/onlineVisualSpeller/erp_components']);
5
6 % The three factors are embedded in the 2nd dimension, need to be un-nested
7 nlevels = [3 2 3]; % Specify fastest varying levels first (Electrode)
8 dat = nested2multidata(l.amp,nlevels);
9
10 size(dat)
11
12 % Perform 3-way repeated-measures ANOVA
13 [p,t,stats,terms,arg] = rmanova(dat,{'Electrode' 'Status' 'Speller'});
14
15 % Tukey-Kramer post-hoc test
16 comp = multcompare(stats,'estimate','anovan','dimension',[4 ]);
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.