Question regarding codes

I am attempting to set up a code system to give me an easier to analyze data file.

In my experiment the participants are asked to determine what facial expression the person is expressing.How do I set up a code so that I can get a very clear file so I can see whether the participant was correct or not based on a specific facial expression?

I have it set up currently so I have a code name for each facial expression and the values set to correct/incorrect… in the event editor I have set it up so that the ‘correct’ one is highlighted… however this leads to the response that it is always correct no matter what the participant presses.

I want it set up so I have a column for each facial expression, and then a correct/incorrect for each of the fields. What should i do next?

It sounds like you are trying to use code values to define how the participant responded, which is not what they are designed to do, at least not with the level of interactivity you’re looking for. In your situation, the more common approach would be to have one code named “facial expression” with a value for each type of expression you are using. You would then set the one code on each of your stimuli, and you would probably define what the correct response is based on the code values–at least, you would if you were using a stimulus list.

Using Feedback, SuperLab can change a code value on an event or a trial based on whether the response was correct or not, as well as a few other situations.

Check out the letter rotation experiment as an example: http://community.cedrus.com/showthread.php?t=46

If you aren’t using stimulus lists and are pretty set on wanting your data file to look as you have described, then I would recommend setting no code values on any of the events. Instead, set up feedback on each of the events to do the following: If the response is correct, then mark the relevant code “correct.” If it’s incorrect, mark the relevant code “incorrect.” Then, the fields will be blank for all entries except those that have been explicitly marked by feedback which will make it really easy to read which expressions were correct and which were incorrect.

This approach is incompatible with stimulus lists because you can’t set feedback on a stimulus–you tie it to an event. Since the behavior depends on the stimulus, you have to hand-create a different event for each stimulus to get this behavior.

I hope this helps.

i’m not using a stimuli list and have therefore been attempting the second scenario. I could not figure out what you are talking about regarding the feedback. For the feedback option in the event menu all that I can change is if I repeat the event or not. I have tried countless scenarios for the codes but I have yet to have luck.

To make this completely brainless for me, what goes in the left menu under ‘codes’ and what goes under the ‘right’? Do I even use codes at all?

Sorry, I was just really confused by those directions. Thanks a lot for your help!

-Mike

Mike,

In the code editor, you need to make a code for each facial expression you are using. Each code needs to have two values: correct and incorrect. After you’ve done this, you can setup the feedback on the events.

Suppose you are editing an event with a “confused” expression. :wink: You need to setup in the Input tab what you expect the correct and incorrect answer(s) to be. Then, in the feedback tab of the event editor, create a new feedback condition to provide feedback if the response is not correct. With that condition highlighted, create a new action (“What to Do”). The action will need to change the code value for “confused” to “incorrect.” You also need to create a new condition and action for correct responses. You will need to create feedback conditions and actions for each of your events.

In the “Code Values” tab of the event editor, none of the codes should be highlighted.

After all of this is done, your data output file will have a column for each expression. The columns will be mostly empty. Each row will have either the word “correct” or the word “incorrect” under one and only one column, and the column will tell you what type of stimulus was presented.

e.g.:

Name____________Happy______Confused______Sad____
Picture 1_________correct____________________________
Picture 2_____________________incorrect______________
Picture 3_____________________________________correct

Of course, SuperLab spits out much more information than I do, including what the actual response was, but that’s about what it would look like. I hope this helps!

Great, this does help a lot.

I was wondering if it was also possible to group certain trails together under categories and then store all their reaction times under one column. Therefore to import the reaction times for “confused” :slight_smile: I could just copy and paste the entire column from that file.

Does this make sense?

I don’t think so.

However, if you sort based on the “Confused” column in a program such as Excel, then the relevant reaction times would all be grouped together.

i am having trouble with this. Regardless of my feedback, the answer always somes up as the value that is highlighted. If I don’t highlight it, nothing comes up.

Is there any way I could just send you the file? Would that be easier?

[QUOTE=Hank;441]Mike,

In the code editor, you need to make a code for each facial expression you are using. Each code needs to have two values: correct and incorrect. After you’ve done this, you can setup the feedback on the events.

Suppose you are editing an event with a “confused” expression. :wink: You need to setup in the Input tab what you expect the correct and incorrect answer(s) to be. Then, in the feedback tab of the event editor, create a new feedback condition to provide feedback if the response is not correct. With that condition highlighted, create a new action (“What to Do”). The action will need to change the code value for “confused” to “incorrect.” You also need to create a new condition and action for correct responses. You will need to create feedback conditions and actions for each of your events.

In the “Code Values” tab of the event editor, none of the codes should be highlighted.

After all of this is done, your data output file will have a column for each expression. The columns will be mostly empty. Each row will have either the word “correct” or the word “incorrect” under one and only one column, and the column will tell you what type of stimulus was presented.

e.g.:

Name____________Happy______Confused______Sad____
Picture 1_________correct____________________________
Picture 2_____________________incorrect______________
Picture 3_____________________________________correct

Of course, SuperLab spits out much more information than I do, including what the actual response was, but that’s about what it would look like. I hope this helps![/QUOTE]

Sure. I’ll PM you my e-mail address.

As it turns out, what you are trying to do isn’t possible. In the dialog for creating an action to change an event’s code value, there is a note that says “When a participant’s response is recorded in the data file, the saved code values are the ones in effect -before- this action is executed.” Therefore, my idea won’t work. This action is therefore useful for Macros and for memory experiments, but not simply for changing the data file.

Therefore, you’ll have to rely on the more traditional use of codes and code values to mark the data in the file. Create a code called “emotion” and then set up the values to be the emotions you are using. You’ll have to set the code value on the events in the event editor. You can use a spreadsheet program such as Excel to sort based on the columns.