Cross-validate infoVal against RT quality
Source:R/check_rt_infoval_consistency.R
check_rt_infoval_consistency.RdCorrelates per-participant infoVal with per-participant median response time. The check looks for two patterns that are individually plausible but jointly suspicious:
Usage
check_rt_infoval_consistency(
responses,
method = c("2ifc", "briefrc"),
rdata = NULL,
stimuli = NULL,
noise_matrix = NULL,
base_image = "base",
col_participant = "participant_id",
col_stimulus = "stimulus",
col_response = "response",
col_rt = "rt",
iter = 1000L,
seed = NULL,
...
)Arguments
- responses
Data frame with one row per trial. Required columns:
participant_id,stimulus,response(values in{-1, +1}), andrt(response time, milliseconds). Load yours from CSV viaread_responses()orutils::read.csv(); column names are configurable via thecol_*arguments.- method
"2ifc"or"briefrc".- rdata
Path to the rcicr
.RDatafile (2IFC). Eitherrdataorstimulimust be supplied for the 2IFC path.- stimuli
In-memory stimuli list (the
$stimulielement of anrcisignal_simobject). Use in place ofrdatawhen the file path no longer resolves (e.g. aftersaveRDS()/readRDS()across R sessions).- noise_matrix
Noise matrix for the Brief-RC path. Either a numeric matrix of
n_pixels x pool_size, or a path to a text /.rdsfile (seeread_noise_matrix()).- base_image
Name of the base image in
rdata$base_face_files(2IFC only). Default"base".- col_participant, col_stimulus, col_response, col_rt
Column names.
col_rtis required.- iter
Reference-distribution iterations. Default
1000L.- seed
Optional integer; RNG state restored on exit.
- ...
Unused.
Value
An rcisignal_diag_result() object. data$per_participant has
participant_id, infoval, median_rt. data$correlation is
the Pearson correlation between the two.
Details
High infoVal with fast median RT. A participant producing a seemingly informative CI while responding faster than others is more likely to have produced a spurious signal than genuine meaningful information – the signal may be an artefact of a button-mashing strategy that happens to correlate with the noise.
A negative correlation between infoVal and median RT across participants. If fast responders systematically score higher on infoVal, something about the measurement is off.
Per-producer infoVal z-scores are computed via the package-native
infoval() pipeline; both Brief-RC and 2IFC paradigms are
supported.
Examples
if (FALSE) { # \dontrun{
sim <- simulate_2ifc_data(n_per_condition = 10, n_trials = 60, seed = 1)
check_rt_infoval_consistency(sim$data, method = "2ifc",
rdata = sim$rdata_path, col_rt = "rt")
} # }