fMRI design with jittered ISI

1,097 views
Skip to first unread message

drkitty

unread,
Nov 16, 2012, 8:13:15 AM11/16/12
to psychop...@googlegroups.com
Hi, all.  I'm using PsychoPy 1.75.01 on an Ubuntu 11.04 platforrm.  I'm using Coder. I would like to have a fixed number of trials, of fixed duration, but with variable time intervals between trials.  Varying the ISI is not complicated using random.ranint(2,6) for example.  The tricky part is that I would like the entire trial sequence to be of a fixed duration, e.g., 20 mins.  So, the dilemma is how to vary the ISI around some mean so that every trial sequence is of the same 20 min duration.  I'm attaching a graphical example of my goal.  Any help is very appreciated.
trial_seq.png

drkitty

unread,
Nov 16, 2012, 8:43:29 AM11/16/12
to psychop...@googlegroups.com
I've found this link which may be what I'm looking for: http://preshing.com/20111007/how-to-generate-random-timings-for-a-poisson-process#comment-33488

Essentially, use the random.expovariate function.  Has anyone done this?

Jeremy Gray

unread,
Nov 16, 2012, 8:56:23 AM11/16/12
to psychop...@googlegroups.com
I have never used expovariate, it might work but I worry about the "on average" part. for fMRI, you typically want it to be exact for *every* run, not converge to a given value for the average run.

What I do is define all of the jitters ahead of time as a list of ITI durations, random.shuffle the list for each scanning run, and draw from that list to get a specific ITI. This way, the total length of the run is always the same (= because  its the same list for all subjects, and the whole list gets used). Specific ITIs are effectively random (random subject to the constraints of being drawn without replacement from a list of possible ITIs).

Note that for the best power / efficiency in event-related designs, you typically want to have a greater number of shorter ITIs, and fewer longer ones. To do this, just put more (or fewer) of a given duration into your list. 

--Jeremy


--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychop...@googlegroups.com.
To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/gLZhK5zn-rkJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Chris Cox

unread,
Nov 16, 2012, 9:22:58 AM11/16/12
to psychop...@googlegroups.com
I second that---create the jitters before hand. Or at least create a list of exactly as many long, medium, and short ISIs as you want to occur and shuffle that, but there may be good reasons to take more control over the jitter than to randomize them.

Chris

Nate Vack

unread,
Nov 16, 2012, 9:35:22 AM11/16/12
to psychop...@googlegroups.com
Yup -- depending on your experimental design and what BOLD response
you're expecting, you may be able to optimize your ISI ordering to
give better power than a random ordering.

drkitty

unread,
Nov 16, 2012, 9:36:19 AM11/16/12
to psychop...@googlegroups.com
Thanks for the response.  Yes, I was hoping to avoid pre-generating ISIs, but  generating one sequence and drawing without replacement, may be the way to go.  Thanks again to you both.

Jeremy Gray

unread,
Nov 16, 2012, 9:44:00 AM11/16/12
to psychop...@googlegroups.com
yes indeed. several good tools are available, including optseq2, a package that uses de Bruin cycles, and another with M-sequences. 

Nate Vack

unread,
Nov 16, 2012, 10:08:19 AM11/16/12
to psychop...@googlegroups.com
If you have a complex enough paradigm that those tools won't work for
you, you can also just brute-force generate a boatload of orderings,
compute efficiency for those, and choose the top N most efficient
orderings. N might be one, "a few" or "one for each participant you're
planning to run".

David McFarlane

unread,
Nov 16, 2012, 10:19:39 AM11/16/12
to psychop...@googlegroups.com
I have not kept up with the latest fMRI practices, do people still
have to worry about multicollinearity interfering with image analysis
(e.g., deconvolution, see
http://afni.nimh.nih.gov/pub/dist/HOWTO//howto/ht03_stim/html/stim_background.shtml
)? Where I work, it has been the practice to generate a small
selection of pre-randomized sequences tested to be
non-multicollinear, and then to do runs using only those fixed
sequences; i.e., we do not let the program do any randomization
on-the-fly during the scanning runs.

-- David McFarlane
> <http://preshing.com/20111007/how-to-generate-random-timings-for-a-poisson-process#comment-33488>http://preshing.com/20111007/how-to-generate-random-timings-for-a-poisson-process#comment-33488
Message has been deleted

drkitty

unread,
Nov 17, 2012, 7:13:13 AM11/17/12
to psychop...@googlegroups.com
Yes, multicollinearity is still an issue.  Thanks to you all for your help. You've provided me with lots of good advice and clarified some design issues I've been contemplating.
Reply all
Reply to author
Forward
0 new messages