Summary Data for responses


Author
Message
jacklee-w
jacklee-w
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 12, Visits: 84
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
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
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>

jacklee-w
jacklee-w
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 12, Visits: 84
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. 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search