Learn R Programming

SSRTcalc (version 2.1.1)

ssrt_power: Minimum trial count analysis via Monte Carlo

Description

Simulates datasets of increasing size and computes SSRT variance as a function of trial count (power curve).

Usage

ssrt_power(
  data,
  trial_counts = c(10, 20, 30, 50, 75, 100, 150, 200),
  n_iter = 500,
  target_se = 10,
  stop_col = "vol",
  rt_col = "RT_exp",
  acc_col = "correct",
  ssd_col = "soa",
  seed = 42
)

Value

Object of class ssrt_power.

Arguments

data

data.frame for calibration.

trial_counts

Stop-trial counts to evaluate.

n_iter

MC iterations per count. Default 500.

target_se

Target SE in ms. Default 10.

stop_col, rt_col, acc_col, ssd_col

Column names.

seed

Random seed. Default 42.

Examples

Run this code
data(adaptive)
d <- adaptive[adaptive$SubjID == 1, ]
p <- ssrt_power(d, trial_counts=c(10,30,50), n_iter=200)
print(p)

Run the code above in your browser using DataLab