This function takes a trial results tibble as generated by read_study_data and adds a number of trial-level variables and summary statistics used for quality checks and analyses. Assumes that threat_appear_time has already been computed (as this can be study- and threat-specific)

process_trial_results(trials_raw, buffer_time = 1.5, fade_time = 0.05)

Arguments

trials_raw

A trial results tibble

buffer_time

Time interval that recordings continue after trial ends (default: 1.5 s)

fade_time

Time interval for fading the outcome display (default: 0.05 s)

Details

Requires the following columns: threat, scenario_data_0, head_movement_data_0, threat_movement_data_0, end_state, fruittask0.csv_data_0