Learn R Programming

SSRTcalc (version 2.1.1)

ssrt_boot: Bootstrap confidence intervals for SSRT

Description

Resamples trials with replacement n_iter times and applies the chosen SSRT estimation function to each resample.

Usage

ssrt_boot(
  data,
  ssrt_fn = "integration_adaptiveSSD",
  n_iter = 2000,
  conf = 0.95,
  stop_col = "vol",
  rt_col = "RT_exp",
  acc_col = "correct",
  ssd_col = "soa",
  seed = 42,
  parallel = FALSE,
  n_cores = 2
)

Value

Object of class ssrt_boot.

Arguments

data

data.frame in SSRTcalc long format.

ssrt_fn

SSRT function name. Default "integration_adaptiveSSD".

n_iter

Bootstrap resamples. Default 2000.

conf

Confidence level. Default 0.95.

stop_col, rt_col, acc_col, ssd_col

Column names.

seed

Random seed. Default 42.

parallel

Use parallel::mclapply? (Unix/macOS only). Default FALSE.

n_cores

Cores when parallel=TRUE. Default 2.

Examples

Run this code
data(adaptive)
d <- adaptive[adaptive$SubjID == 1, ]
b <- ssrt_boot(d, n_iter = 500)
print(b)

Run the code above in your browser using DataLab