how to design the 'design' input

89 views
Skip to first unread message

edwardz...@gmail.com

unread,
May 17, 2018, 9:25:50 AM5/17/18
to GLMdenoise
Hi, Kendrick

I have data that one subject with 8 runs. In one run, supposing the conditions are like this:

onset duration trial_type
0.01 6 1
12 6 3
24 6 2
36.01 6 3
50.0 6 1
64 6 2
76 6 1
90 6 3
102 6 2


TR is 2, the question is how the design input matrix should be like.

Kendrick Kay

unread,
May 17, 2018, 12:15:15 PM5/17/18
to edwardz...@gmail.com, GLMdenoise
Hi Edward,

You would construct a design matrix with something like this:

design = {};
design{1} = zeros(60,3); % 60 is just a placeholder
design{1}(1,1) = 1;
design{1}(7,3) = 1;
design{1}(13,2) = 1;
..and so on...

And then you could use parameters: <stimdur> = 6, and <tr> = 2.

Note that time appears to start at 0 seconds in your description; in the design matrix above, this corresponds to the first row of the matrix.

Does that help?

Kendrick
> --
> 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

edwardz...@gmail.com

unread,
May 18, 2018, 2:29:16 AM5/18/18
to GLMdenoise
In this situation, we have 9 conditions , I think the number of row of design{1} should be 6*9-5. You said 60 is just a placeholder. I wonder whether it will have any influence on the final results.

edwardz...@gmail.com

unread,
May 18, 2018, 3:33:43 AM5/18/18
to GLMdenoise
Sorry, my mistake. The design matrix should be time * conditions. Time is from the fMRI time series. I get it. I have run the code and so far it all looks good.
在 2018年5月18日星期五 UTC+8上午12:15:15,Kendrick Kay写道:

Kendrick Kay

unread,
May 18, 2018, 10:44:09 AM5/18/18
to edwardz...@gmail.com, GLMdenoise
>
> Sorry, my mistake. The design matrix should be time * conditions. Time is from the fMRI time series. I get it. I have run the code and so far it all looks good.

Right, I didn't know how many volumes you had in your run, so I just made up the number "60".

Hope everything works well.
Reply all
Reply to author
Forward
0 new messages