You told the program to only analyze voxels that contain data from all subjects: I.DoOnlyAll = 1;

If you change it to 0, then it should run without the error message. However, its somewhat alarming that you don't have overlap from all subjects. Have you checked that the first-level maps contain data from all subjects in the majority of the brain?

Best Regards, Donald McLaren
=================
D.G. McLaren, Ph.D.
Research Fellow, Department of Neurology, Massachusetts General Hospital and
Harvard Medical School
Postdoctoral Research Fellow, GRECC, Bedford VA
Website: http://www.martinos.org/~mclaren
Office: (773) 406-2464
=====================
This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
intended only for the use of the individual or entity named above. If the
reader of the e-mail is not the intended recipient or the employee or agent
responsible for delivering it to the intended recipient, you are hereby
notified that you are in possession of confidential and privileged
information. Any unauthorized use, disclosure, copying or the taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful. If you have received this e-mail
unintentionally, please immediately notify the sender via telephone at (773)
406-2464 or email.


On Mon, Oct 7, 2013 at 4:24 PM, Muhammad Adeel Parvaz <[log in to unmask]> wrote:
Hi Donalad and other SPMers,

I have updated the GLMFlex from 2012-12-10 to 2013-09-09, and now when I run a ANOVA with a between-subject (Controls versus clinical group) and a within-subject (time 1 vs time 2). I have setup the script as

clear IN; clear F; clear I;
IN.N_subs = [19 12];
IN.Between = [1 2];  
IN.BetweenLabs = {{'All'} {'Clinical', 'Controls'}};
IN.Within = [2];
IN.WithinLabs = {'Time1' 'Time2'};
IN.FactorLabs = {'F1' 'F2'};
IN.Interactions = {[2 3]};
IN.EqualVar = [1 0 0];
IN.Independent = [1 1 0];

F = CreateDesign(IN);

figure(20); imagesc(F.XX); shg

I.OutputDir = pwd;
I.F = F;
I.Scans = Scans;
I.RemoveOutliers = 0;
I.minN = 2;
I.DoOnlyAll = 1;
I.CompOpt=0;


I = GLM_Flex(I); 

I.Cons(1).name = 'All';
I.Cons(1).Groups = {1};
I.Cons(1).Levs = [1];
I.Cons(1).ET = [];
I.Cons(1).mean = 0;

I.Cons(2).name = 'Group Effect';
I.Cons(2).Groups = {2 3};
I.Cons(2).Levs = [2];
I.Cons(2).ET = [];
I.Cons(2).mean = 0;

I.Cons(3).name = 'Time Effect';
I.Cons(3).Groups = {4 5};
I.Cons(3).Levs = [2];
I.Cons(3).ET = [];
I.Cons(3).mean = 0;

I.Cons(4).name = 'Group by Time';
I.Cons(4).Groups = {6 7 8 9};
I.Cons(4).Levs = [2 2];
I.Cons(4).ET = [];
I.Cons(4).mean = 0;

I = GLM_Flex_Contrasts(I);


Now when I run the script, I get the following error:

>> GLMFlex_script
Finished Creating Factor Matrix
Finished Creating Main Effects
Finished Creating Two Way Interactions
Finished Creating Three Way Interactions
Finished Creating Four Way Interactions
Finished Creating Design Matrix.
Finished Other Stuff.
Reading In Image Files:


Processing Set #62No go
Error using GLM_Flex (line 556)
Something went wrong.  No voxels were anlyzed.  This is most commonly cause by a mis-specified I.minN or a problem with performing the
variance/covariance correction

Error in GLMFlex_script (line 28)
I = GLM_Flex(I);

I am not sure what exactly is I.minN is doing and what value should I assign to it.

Thanks
Muhammad