run_process_negative_controls: Run repeated process negative controls

View source: R/077-negative-controls-leakage-0-9.R

run_process_negative_controlsR Documentation

Run repeated process negative controls

Description

Run repeated process negative controls

Usage

run_process_negative_controls(
  data,
  outcome,
  analysis_fun,
  controls = c("permutation", "shift"),
  replications = 100L,
  seed = 1L,
  extract_fun = .ep09_default_control_extract,
  shift_lags = c(-3L, -2L, -1L, 1L, 2L, 3L),
  within = NULL
)

Arguments

data

Data frame.

outcome

Outcome column.

analysis_fun

Function applied to each negative-control dataset.

controls

Character vector among 'permutation' and 'shift'.

replications

Number of controls per type.

seed

Seed.

extract_fun

Function converting analysis result to a data.frame.

shift_lags

Lags sampled for shift controls.

within

Optional permutation groups.

Value

A named list with components "results", "outcome", "controls", "replications", "seed", "interpretation", containing repeated process negative controls and associated metadata or diagnostics.


eyeprocess documentation built on Sept. 28, 2026, 5:08 p.m.