Example input for design with Onset vectors in seconds

145 views
Skip to first unread message

RK

unread,
Feb 2, 2016, 9:01:31 AM2/2/16
to GLMdenoise
Hey, I am creating the design variable as described ("{{C1_1 C2_1 C3_1 ...} {C1_2 C2_2 C3_2 ...} ...}") ie design= {{[1 ; 2 ; 4] [2 ;3 ;7]} {[3 ;8 ;12] [4 7 9]}}

However, I get the following error

*** GLMdenoisedata: performing full fit to estimate global HRF. ***
fitting model...Error using GLMestimatemodel>fitmodel_helper (line 769)
Assertion failed.

Error in GLMestimatemodel (line 393)
[results{1},hrffitvoxels,cache] = ...

Error in GLMdenoisedata (line 617)
fullfit = GLMestimatemodel(design,data,stimdur,tr,hrfmodel,hrfknobs,0,opt,[],2);

So it calls assertnexpecting not to find a cell within design{1}

Would it be possible to see the "onsets in seconds" design variable that would fit with the example data, or is the problem not how the design variable is set up?

Thanks a lot!
R

Kendrick Kay

unread,
Feb 2, 2016, 9:17:26 AM2/2/16
to RK, GLMdenoise
With the onset-in-seconds specification, you have to pass 'hrfmodel' as 'assume'.  Did you do that?

Also, make sure the onset listings are row vectors, not column vectors.  e.g. [1 2 4] not [1;2;4]




--
Kendrick Kay, PhD
Assistant Professor
Center for Magnetic Resonance Research
University of Minnesota, Twin Cities
   Web: http://cvnlab.net
E-mail: k...@umn.edu
  Cell: 510-206-1059
 Skype: kendrickkay

--
You received this message because you are subscribed to the Google Groups "GLMdenoise" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glmdenoise+...@googlegroups.com.
To post to this group, send email to glmde...@googlegroups.com.
Visit this group at https://groups.google.com/group/glmdenoise.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

sphs...@gmail.com

unread,
May 10, 2019, 12:25:56 PM5/10/19
to GLMdenoise
Hi all,

I am also trying to specify a design matrix with "onsets in seconds". I have a Stroop task with 3 runs which are not timelocked to the TR and I would like to use MVPA to classifiy congruent vs incongruent trials. In FSL I ran single-trial GLM resulting in one beta map for each trial. So essential each trial was its own condition. So this would mean that for GLMdenoise regardless of the true condition (congruent vs incongruent) I would specify each trials as its own condition. In the FAQ and in the 2013 paper I read that condition need to repeat at least once due to the cross validation. So now I'm not sure how to proceed. Could you advise me how to specify the DM in this case?

Thanks for your help,

Sebastian

Kendrick Kay

unread,
May 10, 2019, 4:06:13 PM5/10/19
to sphs...@gmail.com, GLMdenoise
Hello,

I think what's happening here is that you are specifying your design with the "C" case, but that case is compatible noly with <hrfmodel> set to 'assume'.  It looks like you are trying the case of <hrfmodel> set to 'optimize'.



I am also trying to specify a design matrix with "onsets in seconds". I have a Stroop task with 3 runs which are not timelocked to the TR and I would like to use MVPA to classifiy congruent vs incongruent trials. In FSL I ran single-trial GLM resulting in one beta map for each trial. So essential each trial was its own condition.  So this would mean that for GLMdenoise regardless of the true condition (congruent vs incongruent) I would specify each trials as its own condition. In the FAQ and in the 2013 paper I read that condition need to repeat at least once due to the cross validati

You are right that GLMdenoise requires repetitions of conditions (across runs).  If you want single-trial estimates, then it's not possible, strictly speaking, to use GLMdenoise.  However, some people have done approaches where you initially analyze the data with conditions repeating, and then remove the noise and reanalyze as single trials...   One possibility is that you lose a little bit of the strictness of the independence of the trials...

Another approach is to split your trials into different groups (and have those groups repeat across runs).  This isn't quite single trial, but maybe that might be useful.  We call this "condition-splitting" (see Kay et al Neuroimage 2019).


One other idea: if you don't need the denoising features of GLMdenoisedata.m, you could fit a single-trial GLM using the GLMestimatemodel.m function.



Kendrick



--
Kendrick Kay, PhD
Assistant Professor
Center for Magnetic Resonance Research
University of Minnesota
E-mail: k...@umn.edu

Reply all
Reply to author
Forward
0 new messages