By definition, SPM.xBF.order must be 2 for including the time derivatives, 3 if you include the time and dispersion. Thus, your contrast has 2 rows in it. This makes it invalid for a T-contrast. You can either change the contrast type to an F, or change the contrast. However, you can't use an F-test from the first-level at as the inputs for the second-level. Additionally, the average the HRF and time derivative isn't measningful. If you are looking at trying to come up with an integrated method for the HRF and time derivative to use at the second level, I would recommend that you read Steffener et al.(Investigating hemodynamic response variability at the group level using basis functions) or Calhoun et al. (fMRI analysis with the general linear model: removal of latency-induced amplitude bias by incorporation of hemodynamic derivative terms). Best Regards, Donald McLaren ================= D.G. McLaren, Ph.D. Postdoctoral Research Fellow, GRECC, Bedford VA Research Fellow, Department of Neurology, Massachusetts General Hospital and Harvard Medical School 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 Sun, Aug 14, 2011 at 5:51 AM, gj <[log in to unmask]> wrote: > Hi, > > I'm running a Matlab script (largely based on the one by Rik Henson) to do > 1st level analysis in SPM 8, with an HRF w/time deriv basis set: > > SPM.xBF.name = 'hrf (with time derivative)'; > SPM.xBF.order = 1; > > which results in the following error: > "Error using ==> spm_FcUtil at 216 > trying to define a t that looks like an F" > > > > I did > dbstop error > before the run to see what gets passed to spm_FcUtil, but not sure what I'm > looking for. > > The same general code runs with no errors when modeling with HRF only (no > time derivatives), so I suspect that I'm not modifying the code and hence my > contrasts correctly for time derivatives? I notice that even though I > specify "SPM.xBF.order = 1;" that along the way, SPM.xBF.order = 2. Here is > the snippet of code that might be culprit. The "nusr" is for the nuisance > regressors (bad spikes, movements) > > ***** begin snippet ***** > eb = eye(SPM.xBF.order); > > cnam{1} = 'contrast1'; > cwgt{1} = [kron([1 0 1 0],eb) zeros(size(eb,1),nusr)]; > ctyp{1} = 'T'; > > > ... > for c = 1:length(cnam) > clear cw; > cw = [cwgt{c} zeros(size(cwgt{c},1),1)]'; > spm_FcUtil('Set',cnam{c},ctyp{c},'c',cw,SPM.xX.xKXs); > end > > ****** end snippet ***** > > > Any help much appreciated! > > g >