GA2 hrfest error

33 views
Skip to first unread message

alexandr...@gmail.com

unread,
Jan 27, 2016, 12:46:31 PM1/27/16
to WagerlabTools
Hello all,

I’m looking to optimize jitter and trial sequence for a task in which there are 6 trial types, and each trial has 2 parts that also need varying intervals between parts.
I’m new to using this toolbox, but it seems that I should be using GA2 to optimize the timing of within-trial parts, and that I can also introduce between-trial jitter using GA2 by giving a range of trial onsets.

However, I’m running into a problem using GA2- whether I input the example parameters or my own design parameters, I encounter the following error after setting up the model and calling ga2 function:

[evtonsets,X,bestp,meff] = ga2(20,500,conditions,mspec);

Computing A-optimality

In an assignment A(I) = B, the number of elements in B and I must be the same.

Error in ga2 (line 140)

for j=1:length(conditions(i).subcond), numframes(end+1) = conditions(i).subcond(j).hrfest;


This appears to be because hrfest is empty for conditions(i).subcond(j). I’m new to using the script so I’m not sure why hrf is set to [] in the model_setup_ui, but am hoping for some guidance in how to fix this issue.

Any help would be much appreciated!
Thanks

Alexandra Gaynor

Tor Wager

unread,
Jan 12, 2017, 10:42:23 AM1/12/17
to alexandr...@gmail.com, WagerlabTools
Hi Alexandra,

You’re correct - GA2 is the program that allows you to specify designs with dependencies across events within trials.

The original GA works well, but the GA2 program wasn’t maintained very well over time, so there are some bugs that need to be fixed now.  I’m sorry about that.  

In case it’s useful, I’m attaching some scripts that I used to generate optimized designs with dependencies across events within trials, in a stop-signal and an MID task.  To run them, you may need the “CANlab Core” functions on your matlab path, available here: https://github.com/canlab.

I hope these may be useful to you.

Best,
Tor


Wager_Opt_scripts_ABCD.zip
Reply all
Reply to author
Forward
0 new messages