Millisecond Forums

Adding data from specific trials into summary data

https://www.millisecond.com/forums/Topic29451.aspx

By crstevenson - 7/16/2020

Hi!

Is there a way to add data from specific trials (for example, reaction time, response, and stimulus from the final 3 trials of the task) to the summary data file output? Ideally these would become columns (so there would be 9 additional columns; reaction time for trial 1, 2, and 3; response for trial 1, 2, and 3; and stimulus for trial 1, 2, and 3). Is it possible to bring specific pieces of data from individual trials into their own column? I've tried adding response, latency, and stimulusitem to <summarydata> but that hasn't worked. I've also tried adding the following, and in short I'm stuck. I understand this might not be possible because it involves shifting rows/cells to columns. If I can somehow just get information from those 3 trials there without shifting them to columns, that would be alright as well.

<summarydata>
/ columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
if(compatibletest_WMMath_AFArts_lastblock_withspontrials | block.compatibletest_AFArts_WMMath_lastblock_withspontrials block.incompatibletest_AFMath_WMArts_lastblock_withspontrials | block.incompatibletest_WMArts_AFMath_lastblock_withspontrials) {
    /columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
}

</summarydata>

Thanks so much!
By Dave - 7/17/2020

crstevenson - 7/17/2020
Hi!

Is there a way to add data from specific trials (for example, reaction time, response, and stimulus from the final 3 trials of the task) to the summary data file output? Ideally these would become columns (so there would be 9 additional columns; reaction time for trial 1, 2, and 3; response for trial 1, 2, and 3; and stimulus for trial 1, 2, and 3). Is it possible to bring specific pieces of data from individual trials into their own column? I've tried adding response, latency, and stimulusitem to <summarydata> but that hasn't worked. I've also tried adding the following, and in short I'm stuck. I understand this might not be possible because it involves shifting rows/cells to columns. If I can somehow just get information from those 3 trials there without shifting them to columns, that would be alright as well.

<summarydata>
/ columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
if(compatibletest_WMMath_AFArts_lastblock_withspontrials | block.compatibletest_AFArts_WMMath_lastblock_withspontrials block.incompatibletest_AFMath_WMArts_lastblock_withspontrials | block.incompatibletest_WMArts_AFMath_lastblock_withspontrials) {
    /columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
}

</summarydata>

Thanks so much!

Insert or append whatever information from whatever trials you are interested in in <list> elements and then just log each respective list elements' three items to the data file as columns.
By crstevenson - 7/17/2020

Dave - 7/17/2020
crstevenson - 7/17/2020
Hi!

Is there a way to add data from specific trials (for example, reaction time, response, and stimulus from the final 3 trials of the task) to the summary data file output? Ideally these would become columns (so there would be 9 additional columns; reaction time for trial 1, 2, and 3; response for trial 1, 2, and 3; and stimulus for trial 1, 2, and 3). Is it possible to bring specific pieces of data from individual trials into their own column? I've tried adding response, latency, and stimulusitem to <summarydata> but that hasn't worked. I've also tried adding the following, and in short I'm stuck. I understand this might not be possible because it involves shifting rows/cells to columns. If I can somehow just get information from those 3 trials there without shifting them to columns, that would be alright as well.

<summarydata>
/ columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
if(compatibletest_WMMath_AFArts_lastblock_withspontrials | block.compatibletest_AFArts_WMMath_lastblock_withspontrials block.incompatibletest_AFMath_WMArts_lastblock_withspontrials | block.incompatibletest_WMArts_AFMath_lastblock_withspontrials) {
    /columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
}

</summarydata>

Thanks so much!

Insert or append whatever information from whatever trials you are interested in in <list> elements and then just log each respective list elements' three items to the data file as columns.

Thanks! I've added the following to each appropriate trial, but I'm not sure what to put in the brackets after appenditem - all I want it to show is the value in the cell I'm specifying (e.g., latency for this specific type of trial)

/ ontrialend = [
values.SortbyRace += trial.faceWFleft.correct;
list.stimulusitem.appenditem(values) && list.response.appenditem(values) && list.latency.appenditem(values); list.stimulusitem.appenditem(values) && list.response.appenditem(values) && list.latency.appenditem(values);
]
By Dave - 7/17/2020

crstevenson - 7/17/2020
Dave - 7/17/2020
crstevenson - 7/17/2020
Hi!

Is there a way to add data from specific trials (for example, reaction time, response, and stimulus from the final 3 trials of the task) to the summary data file output? Ideally these would become columns (so there would be 9 additional columns; reaction time for trial 1, 2, and 3; response for trial 1, 2, and 3; and stimulus for trial 1, 2, and 3). Is it possible to bring specific pieces of data from individual trials into their own column? I've tried adding response, latency, and stimulusitem to <summarydata> but that hasn't worked. I've also tried adding the following, and in short I'm stuck. I understand this might not be possible because it involves shifting rows/cells to columns. If I can somehow just get information from those 3 trials there without shifting them to columns, that would be alright as well.

<summarydata>
/ columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
if(compatibletest_WMMath_AFArts_lastblock_withspontrials | block.compatibletest_AFArts_WMMath_lastblock_withspontrials block.incompatibletest_AFMath_WMArts_lastblock_withspontrials | block.incompatibletest_WMArts_AFMath_lastblock_withspontrials) {
    /columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
}

</summarydata>

Thanks so much!

Insert or append whatever information from whatever trials you are interested in in <list> elements and then just log each respective list elements' three items to the data file as columns.

Thanks! I've added the following to each appropriate trial, but I'm not sure what to put in the brackets after appenditem - all I want it to show is the value in the cell I'm specifying (e.g., latency for this specific type of trial)

/ ontrialend = [
values.SortbyRace += trial.faceWFleft.correct;
list.stimulusitem.appenditem(values) && list.response.appenditem(values) && list.latency.appenditem(values); list.stimulusitem.appenditem(values) && list.response.appenditem(values) && list.latency.appenditem(values);
]

You append whatever property of whatever element you're after. That's not something I can see from this code snippet, except for a few exceptions where I can guess. Moreover, the syntax is wrong. You're not performing any conditional logic checks, so there is no place for logical ANDs (&&) here.

/ ontrialend = [
values.SortbyRace += trial.faceWFleft.correct;
list.stimulusitem.appenditem(??? don't know and can't see from the code ???);
list.response.appenditem(trial.faceWFleft.response);
list.latency.appenditem(trial.faceWFleft.latency);

//why are these here again? this makes no sense.

list.stimulusitem.appenditem(values);
list.response.appenditem(values);
list.latency.appenditem(values);
]
By Dave - 7/17/2020

Dave - 7/17/2020
crstevenson - 7/17/2020
Dave - 7/17/2020
crstevenson - 7/17/2020
Hi!

Is there a way to add data from specific trials (for example, reaction time, response, and stimulus from the final 3 trials of the task) to the summary data file output? Ideally these would become columns (so there would be 9 additional columns; reaction time for trial 1, 2, and 3; response for trial 1, 2, and 3; and stimulus for trial 1, 2, and 3). Is it possible to bring specific pieces of data from individual trials into their own column? I've tried adding response, latency, and stimulusitem to <summarydata> but that hasn't worked. I've also tried adding the following, and in short I'm stuck. I understand this might not be possible because it involves shifting rows/cells to columns. If I can somehow just get information from those 3 trials there without shifting them to columns, that would be alright as well.

<summarydata>
/ columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
if(compatibletest_WMMath_AFArts_lastblock_withspontrials | block.compatibletest_AFArts_WMMath_lastblock_withspontrials block.incompatibletest_AFMath_WMArts_lastblock_withspontrials | block.incompatibletest_WMArts_AFMath_lastblock_withspontrials) {
    /columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
}

</summarydata>

Thanks so much!

Insert or append whatever information from whatever trials you are interested in in <list> elements and then just log each respective list elements' three items to the data file as columns.

Thanks! I've added the following to each appropriate trial, but I'm not sure what to put in the brackets after appenditem - all I want it to show is the value in the cell I'm specifying (e.g., latency for this specific type of trial)

/ ontrialend = [
values.SortbyRace += trial.faceWFleft.correct;
list.stimulusitem.appenditem(values) && list.response.appenditem(values) && list.latency.appenditem(values); list.stimulusitem.appenditem(values) && list.response.appenditem(values) && list.latency.appenditem(values);
]

You append whatever property of whatever element you're after. That's not something I can see from this code snippet, except for a few exceptions where I can guess. Moreover, the syntax is wrong. You're not performing any conditional logic checks, so there is no place for logical ANDs (&&) here.

/ ontrialend = [
values.SortbyRace += trial.faceWFleft.correct;
list.stimulusitem.appenditem(??? don't know and can't see from the code ???);
list.response.appenditem(trial.faceWFleft.response);
list.latency.appenditem(trial.faceWFleft.latency);

//why are these here again? this makes no sense.

list.stimulusitem.appenditem(values);
list.response.appenditem(values);
list.latency.appenditem(values);
]

Perhaps this short example will clarify:

<block exampleblock>
/ trials = [1-9 = noreplace(a_trial, b_trial, c_trial)]
</block>

<trial a_trial>
/ stimulusframes = [1=a_stimulus]
/ validresponse = (anyresponse)
/ correctresponse = ("a")
/ ontrialend = [
    list.trialtype.appenditem(trial.a_trial.name);
    list.stimulusitem.appenditem(text.a_stimulus.currentitem);
    list.response.appenditem(trial.a_trial.response);
    list.latency.appenditem(trial.a_trial.latency);
]
</trial>

<trial b_trial>
/ stimulusframes = [1=b_stimulus]
/ validresponse = (anyresponse)
/ correctresponse = ("b")
/ ontrialend = [
    list.trialtype.appenditem(trial.b_trial.name);
    list.stimulusitem.appenditem(text.b_stimulus.currentitem);
    list.response.appenditem(trial.b_trial.response);
    list.latency.appenditem(trial.b_trial.latency);
]
</trial>

<trial c_trial>
/ stimulusframes = [1=c_stimulus]
/ validresponse = (anyresponse)
/ correctresponse = ("c")
/ ontrialend = [
    list.trialtype.appenditem(trial.c_trial.name);
    list.stimulusitem.appenditem(text.c_stimulus.currentitem);
    list.response.appenditem(trial.c_trial.response);
    list.latency.appenditem(trial.c_trial.latency);
]
</trial>

<text a_stimulus>
/ items = ("Apple", "Automaton", "Arson")
</text>

<text b_stimulus>
/ items = ("Banana", "Brother", "Blood")
</text>

<text c_stimulus>
/ items = ("Coffee", "Car", "Crisis")
</text>


<list trialtype>
</list>
<list stimulusitem>
</list>
<list response>
</list>
<list latency>
</list>

<summarydata>
/ columns = (script.startdate, script.starttime, script.subjectid, script.groupid,
list.trialtype.item(1), list.stimulusitem.item(1), list.response.item(1), list.latency.item(1),
list.trialtype.item(2), list.stimulusitem.item(2), list.response.item(2), list.latency.item(2),
list.trialtype.item(3), list.stimulusitem.item(3), list.response.item(3), list.latency.item(3)
)
/ separatefiles = true
</summarydata>

By crstevenson - 8/5/2020

Dave - 7/17/2020
Dave - 7/17/2020
crstevenson - 7/17/2020
Dave - 7/17/2020
crstevenson - 7/17/2020
Hi!

Is there a way to add data from specific trials (for example, reaction time, response, and stimulus from the final 3 trials of the task) to the summary data file output? Ideally these would become columns (so there would be 9 additional columns; reaction time for trial 1, 2, and 3; response for trial 1, 2, and 3; and stimulus for trial 1, 2, and 3). Is it possible to bring specific pieces of data from individual trials into their own column? I've tried adding response, latency, and stimulusitem to <summarydata> but that hasn't worked. I've also tried adding the following, and in short I'm stuck. I understand this might not be possible because it involves shifting rows/cells to columns. If I can somehow just get information from those 3 trials there without shifting them to columns, that would be alright as well.

<summarydata>
/ columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
if(compatibletest_WMMath_AFArts_lastblock_withspontrials | block.compatibletest_AFArts_WMMath_lastblock_withspontrials block.incompatibletest_AFMath_WMArts_lastblock_withspontrials | block.incompatibletest_WMArts_AFMath_lastblock_withspontrials) {
    /columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
}

</summarydata>

Thanks so much!

Insert or append whatever information from whatever trials you are interested in in <list> elements and then just log each respective list elements' three items to the data file as columns.

Thanks! I've added the following to each appropriate trial, but I'm not sure what to put in the brackets after appenditem - all I want it to show is the value in the cell I'm specifying (e.g., latency for this specific type of trial)

/ ontrialend = [
values.SortbyRace += trial.faceWFleft.correct;
list.stimulusitem.appenditem(values) && list.response.appenditem(values) && list.latency.appenditem(values); list.stimulusitem.appenditem(values) && list.response.appenditem(values) && list.latency.appenditem(values);
]

You append whatever property of whatever element you're after. That's not something I can see from this code snippet, except for a few exceptions where I can guess. Moreover, the syntax is wrong. You're not performing any conditional logic checks, so there is no place for logical ANDs (&&) here.

/ ontrialend = [
values.SortbyRace += trial.faceWFleft.correct;
list.stimulusitem.appenditem(??? don't know and can't see from the code ???);
list.response.appenditem(trial.faceWFleft.response);
list.latency.appenditem(trial.faceWFleft.latency);

//why are these here again? this makes no sense.

list.stimulusitem.appenditem(values);
list.response.appenditem(values);
list.latency.appenditem(values);
]

Perhaps this short example will clarify:

<block exampleblock>
/ trials = [1-9 = noreplace(a_trial, b_trial, c_trial)]
</block>

<trial a_trial>
/ stimulusframes = [1=a_stimulus]
/ validresponse = (anyresponse)
/ correctresponse = ("a")
/ ontrialend = [
    list.trialtype.appenditem(trial.a_trial.name);
    list.stimulusitem.appenditem(text.a_stimulus.currentitem);
    list.response.appenditem(trial.a_trial.response);
    list.latency.appenditem(trial.a_trial.latency);
]
</trial>

<trial b_trial>
/ stimulusframes = [1=b_stimulus]
/ validresponse = (anyresponse)
/ correctresponse = ("b")
/ ontrialend = [
    list.trialtype.appenditem(trial.b_trial.name);
    list.stimulusitem.appenditem(text.b_stimulus.currentitem);
    list.response.appenditem(trial.b_trial.response);
    list.latency.appenditem(trial.b_trial.latency);
]
</trial>

<trial c_trial>
/ stimulusframes = [1=c_stimulus]
/ validresponse = (anyresponse)
/ correctresponse = ("c")
/ ontrialend = [
    list.trialtype.appenditem(trial.c_trial.name);
    list.stimulusitem.appenditem(text.c_stimulus.currentitem);
    list.response.appenditem(trial.c_trial.response);
    list.latency.appenditem(trial.c_trial.latency);
]
</trial>

<text a_stimulus>
/ items = ("Apple", "Automaton", "Arson")
</text>

<text b_stimulus>
/ items = ("Banana", "Brother", "Blood")
</text>

<text c_stimulus>
/ items = ("Coffee", "Car", "Crisis")
</text>


<list trialtype>
</list>
<list stimulusitem>
</list>
<list response>
</list>
<list latency>
</list>

<summarydata>
/ columns = (script.startdate, script.starttime, script.subjectid, script.groupid,
list.trialtype.item(1), list.stimulusitem.item(1), list.response.item(1), list.latency.item(1),
list.trialtype.item(2), list.stimulusitem.item(2), list.response.item(2), list.latency.item(2),
list.trialtype.item(3), list.stimulusitem.item(3), list.response.item(3), list.latency.item(3)
)
/ separatefiles = true
</summarydata>


I forgot to thank you, this was very helpful!

I am still having trouble adding the stimulus the participant saw to the datafile. 

I've tried adding this:

<summarydata>
/ columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace,
expressions.Response_SponTrial1, expressions.RT_SponTrial1, expressions.Stim_SponTrial1
expressions.Response_SponTrial2, expressions.RT_SponTrial2, expressions.Stim_SponTrial2
expressions.Response_SponTrial3, expressions.RT_SponTrial3, expressions.Stim_SponTrial3)
</summarydata>

<expressions>
/ Response_SponTrial1 = list.response.item(1)
/ Response_SponTrial2 = list.response.item(2)
/ Response_SponTrial3 = list.response.item(3)
/ RT_SponTrial1 = list.latency.item(1)
/ RT_SponTrial2 = list.latency.item(2)
/ RT_SponTrial3 = list.latency.item(3)
/ Stim_SponTrial1 = list.stimulusname.item(1)
/ Stim_SponTrial2 = list.stimulusname.item(2)
/ Stim_SponTrial3 = list.stimulusname.item(3)

</expressions>

I also added "list.stimulusname" to the appropriate blocks.

Unfortunately, I get a message that these additions are out of range and though the columns are showing up in my data, there is no actual data showing up. I think I have to add something else to the list.stimulusname but I'm not sure what?

Thanks for any help you can provide!
By Dave - 8/6/2020

crstevenson - 8/6/2020
Dave - 7/17/2020
Dave - 7/17/2020
crstevenson - 7/17/2020
Dave - 7/17/2020
crstevenson - 7/17/2020
Hi!

Is there a way to add data from specific trials (for example, reaction time, response, and stimulus from the final 3 trials of the task) to the summary data file output? Ideally these would become columns (so there would be 9 additional columns; reaction time for trial 1, 2, and 3; response for trial 1, 2, and 3; and stimulus for trial 1, 2, and 3). Is it possible to bring specific pieces of data from individual trials into their own column? I've tried adding response, latency, and stimulusitem to <summarydata> but that hasn't worked. I've also tried adding the following, and in short I'm stuck. I understand this might not be possible because it involves shifting rows/cells to columns. If I can somehow just get information from those 3 trials there without shifting them to columns, that would be alright as well.

<summarydata>
/ columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
if(compatibletest_WMMath_AFArts_lastblock_withspontrials | block.compatibletest_AFArts_WMMath_lastblock_withspontrials block.incompatibletest_AFMath_WMArts_lastblock_withspontrials | block.incompatibletest_WMArts_AFMath_lastblock_withspontrials) {
    /columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace, , trialnum,
response, correct, latency,
stimulusnumber, stimulusitem)
}

</summarydata>

Thanks so much!

Insert or append whatever information from whatever trials you are interested in in <list> elements and then just log each respective list elements' three items to the data file as columns.

Thanks! I've added the following to each appropriate trial, but I'm not sure what to put in the brackets after appenditem - all I want it to show is the value in the cell I'm specifying (e.g., latency for this specific type of trial)

/ ontrialend = [
values.SortbyRace += trial.faceWFleft.correct;
list.stimulusitem.appenditem(values) && list.response.appenditem(values) && list.latency.appenditem(values); list.stimulusitem.appenditem(values) && list.response.appenditem(values) && list.latency.appenditem(values);
]

You append whatever property of whatever element you're after. That's not something I can see from this code snippet, except for a few exceptions where I can guess. Moreover, the syntax is wrong. You're not performing any conditional logic checks, so there is no place for logical ANDs (&&) here.

/ ontrialend = [
values.SortbyRace += trial.faceWFleft.correct;
list.stimulusitem.appenditem(??? don't know and can't see from the code ???);
list.response.appenditem(trial.faceWFleft.response);
list.latency.appenditem(trial.faceWFleft.latency);

//why are these here again? this makes no sense.

list.stimulusitem.appenditem(values);
list.response.appenditem(values);
list.latency.appenditem(values);
]

Perhaps this short example will clarify:

<block exampleblock>
/ trials = [1-9 = noreplace(a_trial, b_trial, c_trial)]
</block>

<trial a_trial>
/ stimulusframes = [1=a_stimulus]
/ validresponse = (anyresponse)
/ correctresponse = ("a")
/ ontrialend = [
    list.trialtype.appenditem(trial.a_trial.name);
    list.stimulusitem.appenditem(text.a_stimulus.currentitem);
    list.response.appenditem(trial.a_trial.response);
    list.latency.appenditem(trial.a_trial.latency);
]
</trial>

<trial b_trial>
/ stimulusframes = [1=b_stimulus]
/ validresponse = (anyresponse)
/ correctresponse = ("b")
/ ontrialend = [
    list.trialtype.appenditem(trial.b_trial.name);
    list.stimulusitem.appenditem(text.b_stimulus.currentitem);
    list.response.appenditem(trial.b_trial.response);
    list.latency.appenditem(trial.b_trial.latency);
]
</trial>

<trial c_trial>
/ stimulusframes = [1=c_stimulus]
/ validresponse = (anyresponse)
/ correctresponse = ("c")
/ ontrialend = [
    list.trialtype.appenditem(trial.c_trial.name);
    list.stimulusitem.appenditem(text.c_stimulus.currentitem);
    list.response.appenditem(trial.c_trial.response);
    list.latency.appenditem(trial.c_trial.latency);
]
</trial>

<text a_stimulus>
/ items = ("Apple", "Automaton", "Arson")
</text>

<text b_stimulus>
/ items = ("Banana", "Brother", "Blood")
</text>

<text c_stimulus>
/ items = ("Coffee", "Car", "Crisis")
</text>


<list trialtype>
</list>
<list stimulusitem>
</list>
<list response>
</list>
<list latency>
</list>

<summarydata>
/ columns = (script.startdate, script.starttime, script.subjectid, script.groupid,
list.trialtype.item(1), list.stimulusitem.item(1), list.response.item(1), list.latency.item(1),
list.trialtype.item(2), list.stimulusitem.item(2), list.response.item(2), list.latency.item(2),
list.trialtype.item(3), list.stimulusitem.item(3), list.response.item(3), list.latency.item(3)
)
/ separatefiles = true
</summarydata>


I forgot to thank you, this was very helpful!

I am still having trouble adding the stimulus the participant saw to the datafile. 

I've tried adding this:

<summarydata>
/ columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime,
script.completed, values.conditionOrder,expressions.d, expressions.percentcorrect, expressions.propRT300, expressions.excludeCriteriaMet, values.SortbyRace,
expressions.Response_SponTrial1, expressions.RT_SponTrial1, expressions.Stim_SponTrial1
expressions.Response_SponTrial2, expressions.RT_SponTrial2, expressions.Stim_SponTrial2
expressions.Response_SponTrial3, expressions.RT_SponTrial3, expressions.Stim_SponTrial3)
</summarydata>

<expressions>
/ Response_SponTrial1 = list.response.item(1)
/ Response_SponTrial2 = list.response.item(2)
/ Response_SponTrial3 = list.response.item(3)
/ RT_SponTrial1 = list.latency.item(1)
/ RT_SponTrial2 = list.latency.item(2)
/ RT_SponTrial3 = list.latency.item(3)
/ Stim_SponTrial1 = list.stimulusname.item(1)
/ Stim_SponTrial2 = list.stimulusname.item(2)
/ Stim_SponTrial3 = list.stimulusname.item(3)

</expressions>

I also added "list.stimulusname" to the appropriate blocks.

Unfortunately, I get a message that these additions are out of range and though the columns are showing up in my data, there is no actual data showing up. I think I have to add something else to the list.stimulusname but I'm not sure what?

Thanks for any help you can provide!

> I get a message that these additions are out of range and though the columns are showing up in my data

This means you aren't actually adding any items to these lists in the relevant trials. I.e. in relation to the example code I gave you, you're not properly doing the analogue of this:

<trial a_trial>
/ stimulusframes = [1=a_stimulus]
/ validresponse = (anyresponse)
/ correctresponse = ("a")
/ ontrialend = [
  list.trialtype.appenditem(trial.a_trial.name);
  list.stimulusitem.appenditem(text.a_stimulus.currentitem);
  list.response.appenditem(trial.a_trial.response);
  list.latency.appenditem(trial.a_trial.latency);
]
</trial>