Title: | Easy SSRT Calculation |
---|---|
Description: | This is a collection of functions to calculate stop-signal reaction time (SSRT). Includes functions for both "integration" and "mean" methods; both fixed and adaptive stop-signal delays are supported (see appropriate functions). Calculation is based on Verbruggen et al. (2019) <doi:10.7554/eLife.46323.001> and Verbruggen et al. (2013) <doi:10.1177/0956797612457390>. |
Authors: | Anton Leontyev [aut, cre] |
Maintainer: | Anton Leontyev <[email protected]> |
License: | GPL-3 |
Version: | 0.3.4 |
Built: | 2025-02-08 05:52:42 UTC |
Source: | https://github.com/agleontyev/ssrtcalc |
Data from a mouse movement-based stop-signal experiment, using dynamically set stop-signal delays, with random dot kinematogram as the "go" task, collected from 63 participants
data(adaptive)
data(adaptive)
A data frame with 36288 rows and 7 variables
Subject identifier
stop-signal delay (ignore for "go" trials)
stop (1) or go (0) trial
Percent coherent dots in the kinematogram go task
Response time in seconds, NA if no response was made
Did the participant correctly respond in "go" trials/omit response in "stop" trials (1) or not(0)?
Leontyev and Yamauchi (2019) PLoS One (doi:10.1371/journal.pone.0225437)
data(adaptive) head(adaptive)
data(adaptive) head(adaptive)
Data from a mouse movement-based stop-signal experiment, using preset stop-signal delays, with random dot kinematogram as the "go" task, collected from 51 participants
data(fixed)
data(fixed)
A data frame with 29376 rows and 7 variables
Subject identifier
stop-signal delay (ignore for "go" trials)
stop (1) or go (0) trial
Percent coherent dots in the kinematogram go task
Response time in seconds, NA if no response was made
Which button did the participant click?
Did the participant respond in "go" trials/omit response in "stop" trials (1) or not(0)?
Leontyev and Yamauchi (2019) PLoS One (doi:10.1371/journal.pone.0225437)
data(fixed) head(fixed)
data(fixed) head(fixed)
Estimating SSRT using integration method for studies that use adaptive (increasing/decreasing by a given increment) stop-signal delays.
integration_adaptiveSSD(df, stop_col, rt_col, acc_col, ssd_col)
integration_adaptiveSSD(df, stop_col, rt_col, acc_col, ssd_col)
df |
Dataframe with response time, accuracy, indication whether trial is stop or go, and delays for a given trial. |
stop_col |
Name of the column in the dataframe |
rt_col |
Name of the column in the dataframe |
acc_col |
Name of the column in the dataframe |
ssd_col |
Name of the column in the dataframe |
SSRT corresponding to the nth rt - ssd; n = p(respond|signal)*number of goRTs
data(adaptive) sapply(split(adaptive, adaptive$new_id), integration_adaptiveSSD, stop_col = 'vol', ssd_col = 'soa', rt_col = 'RT_exp', acc_col = 'correct')
data(adaptive) sapply(split(adaptive, adaptive$new_id), integration_adaptiveSSD, stop_col = 'vol', ssd_col = 'soa', rt_col = 'RT_exp', acc_col = 'correct')
Estimating SSRT using integration method for studies that use fixed (randomly chosen on each trial from a pre-determined set) stop-signal delays.
integration_fixedSSD(df, stop_col, rt_col, acc_col, ssd_col, ssd_list)
integration_fixedSSD(df, stop_col, rt_col, acc_col, ssd_col, ssd_list)
df |
Dataframe with response time, accuracy, indication whether trial is stop or go, and delays for a given trial. |
stop_col |
Name of the column in the dataframe |
rt_col |
Name of the column in the dataframe |
acc_col |
Name of the column in the dataframe |
ssd_col |
Name of the column in the dataframe |
ssd_list |
List of stop-signal delays used in the experiment |
SSRT corresponding to the nth rt - ssd; n = p(respond|signal)*number of goRTs
data(fixed) sapply(split(fixed, fixed$new_id), integration_fixedSSD, stop_col = 'vol',acc_col ='acc', rt_col = 'RT_exp', ssd_col = 'soa',ssd_list = c(0.1, 0.2,0.3, 0.4, 0.5, 0.6))
data(fixed) sapply(split(fixed, fixed$new_id), integration_fixedSSD, stop_col = 'vol',acc_col ='acc', rt_col = 'RT_exp', ssd_col = 'soa',ssd_list = c(0.1, 0.2,0.3, 0.4, 0.5, 0.6))
Estimating SSRT using mean method for studies that use adaptive (increasing/decreasing by a given increment) stop-signal delays
mean_adaptiveSSD(df, rt_col, ssd_col, stop_col)
mean_adaptiveSSD(df, rt_col, ssd_col, stop_col)
df |
Dataframe with response time, accuracy, indication whether trial is stop or go, and delays for a given trial. |
rt_col |
Name of the column in the dataframe |
ssd_col |
Name of the column in the dataframe |
stop_col |
Name of the column in the dataframe |
Spline-interpolated stop-signal reaction time corresponding roughly to 50
data(adaptive) sapply(split(adaptive, adaptive$new_id), mean_adaptiveSSD, stop_col = 'vol', ssd_col = 'soa', rt_col = 'RT_exp')
data(adaptive) sapply(split(adaptive, adaptive$new_id), mean_adaptiveSSD, stop_col = 'vol', ssd_col = 'soa', rt_col = 'RT_exp')
Estimating SSRT using mean method for studies that use fixed (randomly chosen on each trial from a pre-determined set) stop-signal delays
mean_fixedSSD(df, stop_col, rt_col, acc_col, ssd_col, ssd_list)
mean_fixedSSD(df, stop_col, rt_col, acc_col, ssd_col, ssd_list)
df |
Dataframe with response time, accuracy, indication whether trial is stop or go, and delays for a given trial. |
stop_col |
Name of the column in the dataframe |
rt_col |
Name of the column in the dataframe |
acc_col |
Name of the column in the dataframe |
ssd_col |
Name of the column in the dataframe |
ssd_list |
List of stop-signal delays used in the experiment |
Stop-signal reaction time corresponding roughly to 50 percent inhibition accuracy.
data(fixed) sapply(split(fixed, fixed$new_id), mean_fixedSSD, stop_col = 'vol',acc_col ='acc', rt_col = 'RT_exp', ssd_col = 'soa',ssd_list = c(0.1, 0.2,0.3, 0.4, 0.5, 0.6))
data(fixed) sapply(split(fixed, fixed$new_id), mean_fixedSSD, stop_col = 'vol',acc_col ='acc', rt_col = 'RT_exp', ssd_col = 'soa',ssd_list = c(0.1, 0.2,0.3, 0.4, 0.5, 0.6))
Plots and prints stop-signal delays and corresponding accuracies. For studies that use fixed (randomly chosen on each trial from a pre-determined set) stop-signal delays.
plotInhFunc(df, stop_col, ssd_col, acc_col)
plotInhFunc(df, stop_col, ssd_col, acc_col)
df |
Dataframe with response time, accuracy, indication whether trial is stop or go, and delays for a given trial. |
stop_col |
Name of the column in the dataframe |
ssd_col |
Name of the column in the dataframe |
acc_col |
Name of the column in the dataframe |
Line plot of the inhibition function.
data(fixed) df <- subset(fixed, new_id == 3) plotInhFunc(df = df, stop_col='vol', ssd_col='soa', acc_col='acc')
data(fixed) df <- subset(fixed, new_id == 3) plotInhFunc(df = df, stop_col='vol', ssd_col='soa', acc_col='acc')