|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/5/2007 12:28:33 PM
Posts: 2,
Visits: 9
|
|
| I'm a beginner in using E-Prime. Recently, I got one major problems which I cannot solve. Dear Forumers, could you help me? My experiment should be like: I have 20 words and 4 colors. Each word should appeared four times, in a different color each time. For instance, cat (in red once), cat (in blue once), cat(in green once) and cat(in yellow once). the presentation of the 80 words should be random, students need to response which color they saw by clicking the keyboard. Question: how to set the 80 word randomized, with the constraint that no word or color appeared twice in succession?
|
|
|
|
|
Forum Guru
      
Group: Moderators
Last Login: 10/30/2008 3:23:17 PM
Posts: 127,
Visits: 924
|
|
Hi Pauline,
To implement your restrictions, you will need to use the script from our "No Repeats on Consecutive Trials" sample (if you are not familiar with this sample, I have attached it). In addition, you will also need to add a User-Defined Data Type (UDT) that will hold the data associated with each condition (i.e. the word presented, the color of the text, etc). I have attached another sample experiment that demonstrates how this could be done.
First, the UDT is defined on the User tab of the Script window (accessed via the View menu, or by pressing ALT+5). For the sample, only the text presented (i.e. "blue", "red", etc) and the color of the text are stored in this data type (as Stim and Color, respectively). In the Initialize InLine, an array of these data types are created, and each slot in the array is initialized to hold a specific trial (i.e. slot 1 holds "blue" text and "blue" color, slot 2 holds "blue" text and "red" color, and so on). For the sample, only 8 trial types are used. For your task, you will need to create a larger array (i.e. to hold all of the different trial types).
Then, the "No Repeats" script begins. Another array is created. This array simply holds the numbers 1-8 to represent the different trials. The array is randomized, and then the Stim and Color properties are checked to make sure that the same Stim and/or Color is not used on consecutive trials. Finally, the TrialList is loaded with each trial. When running the sample, you will see that the same text and color are not presented on consecutive trials.
If you are unfamiliar with the use of InLine script, I would strongly recommend reading through Chapter 4 of the E-Prime User's Guide, as well as reading through the Array, User-Defined Type, and For...Next loop topics in the E-Basic OnLine Help (accessed via the Help menu in E-Studio).
I hope that this has been helpful. Please let me know if you have any questions after taking a look at the sample.
Matt Lenhart
Technical Consultant
- Matt
PST Technical Consultant
http://pstnet.com
|
|
|
|