function[F]=h3repeat_gen_det(N,T,y,x,w,db,dnb,p,q,tr,phi)
[F1]=h3pdcsd_gen_det(N,T,0,p,q,y,x,w,db,dnb,tr,phi);
[F2]=h3pdcsd_gen_det(N,T,1,p,q,y,x,w,db,dnb,tr,phi);
[F3]=h3pdcsd_gen_det(N,T,2,p,q,y,x,w,db,dnb,tr,phi);
[F4]=h3pdcsd_gen_det(N,T,3,p,q,y,x,w,db,dnb,tr,phi);
[F5]=h3pdcsd_gen_det(N,T,4,p,q,y,x,w,db,dnb,tr,phi);
[F6]=h3pdcsd_gen_det(N,T,5,p,q,y,x,w,db,dnb,tr,phi);
[F7]=h3pdcsd_gen_det(N,T,6,p,q,y,x,w,db,dnb,tr,phi);
F=[F1 F2 F3 F4 F5 F6 F7];
%SOS: be careful with the critical values. Because the statistics
%are divided by q, so must the critical values from BP98. 
