Millisecond Forums

Summary Data for responses

https://forums.millisecond.com/Topic22650.aspx

By jacklee-w - 10/8/2017

Hi all,

I was wondering if you could help with a small thing: my task is finished now and as a finaltouch I'd like to add a summary data value which counts the number of times each response is given during the probetrials. The valid responses are "S", "N", "B", and "H". 

There are 8 probes (requesting only one answer), so no answer can be given more than 8 times, but instead of fishing through the raw data to see the response for each trial it would be nice to have some kind of counter, as a summary for each participant.

Let me know!

Thanks,
Jack
By Dave - 10/9/2017

jacklee-w - Monday, October 9, 2017
Hi all,

I was wondering if you could help with a small thing: my task is finished now and as a finaltouch I'd like to add a summary data value which counts the number of times each response is given during the probetrials. The valid responses are "S", "N", "B", and "H". 

There are 8 probes (requesting only one answer), so no answer can be given more than 8 times, but instead of fishing through the raw data to see the response for each trial it would be nice to have some kind of counter, as a summary for each participant.

Let me know!

Thanks,
Jack

You need to create <values> for each response
<values>
/ S_count = 0
/ N_count = 0
/ B_count = 0
/ H_count = 0
</values>

and then increment the respective count in your <trial>s /ontrialend

//S = scancode 31
//N = scancode 49
//B = scancode 48
//H = scancode 35
<trial example>
...
/ validresponse = ("S", "N" "B", "H")
/ ontrialend = [
    if (trial.example.response == 31) values.S_count += 1;
]
/ ontrialend = [
    if (trial.example.response == 49) values.N_count += 1;
]
/ ontrialend = [
    if (trial.example.response == 48) values.B_count += 1;
]
/ ontrialend = [
    if (trial.example.response == 35) values.H_count += 1;
]
</trial>

Finally, log those values to the summary file

<summarydata>
/ columns = [..., values.S_count, values.N_count, values.B_count, values.H_count, ...]
...
</summarydata>
By jacklee-w - 10/9/2017

Dave - Monday, October 9, 2017
jacklee-w - Monday, October 9, 2017
Hi all,

I was wondering if you could help with a small thing: my task is finished now and as a finaltouch I'd like to add a summary data value which counts the number of times each response is given during the probetrials. The valid responses are "S", "N", "B", and "H". 

There are 8 probes (requesting only one answer), so no answer can be given more than 8 times, but instead of fishing through the raw data to see the response for each trial it would be nice to have some kind of counter, as a summary for each participant.

Let me know!

Thanks,
Jack

You need to create <values> for each response
<values>
/ S_count = 0
/ N_count = 0
/ B_count = 0
/ H_count = 0
</values>

and then increment the respective count in your <trial>s /ontrialend

//S = scancode 31
//N = scancode 49
//B = scancode 48
//H = scancode 35
<trial example>
...
/ validresponse = ("S", "N" "B", "H")
/ ontrialend = [
    if (trial.example.response == 31) values.S_count += 1;
]
/ ontrialend = [
    if (trial.example.response == 49) values.N_count += 1;
]
/ ontrialend = [
    if (trial.example.response == 48) values.B_count += 1;
]
/ ontrialend = [
    if (trial.example.response == 35) values.H_count += 1;
]
</trial>

Finally, log those values to the summary file

<summarydata>
/ columns = [..., values.S_count, values.N_count, values.B_count, values.H_count, ...]
...
</summarydata>

Works a treat! Thanks, Dave.