I've been spending a lot of time thinking about design recently, and wanted a way to generate and test designs that have different ordering requirements. For example a design that alternates ABABABABA, or a more elaborate relationship such as ABBAABBAABBA. So, I've made some small changes to Tor Wager and Thomas Nichols' GA scripts and added a couple functions that allow you to specify a "transition probability matrix" for your time series.
For example, the "ABABABABA" design would be specified as such:
(rows are current event, columns are future event)
GA.expTM = [.00 1.0; %A
1.0 .00] %B
GA.TMorder = 1;
The "ABBAABBAABBA" design would be specified as such:
GA.expTM = [.00 1.0; %(AA)
.00 1.0; %(AB)
1.0 .00; %(BA)
1.0 .00] %(BB)
GA.TMorder = 2;
Of course, the matrix cells can take on any value from 0 to 1 (not just 0 or 1). The counterbalancing (transition matrix) can also ignore null events if you so desire. The code is very much untested, but it is well commented.
I wanted to make the code available to everyone in case it's useful or people had suggestions to improve it:
If there's already a better way to do this, please let me know. Thanks,
University of Chicago