Skip to contents

This function repeatedly calls cs_run_single() for a given DGP and estimator, using a vector of seeds. It flattens each structured result into one analysis row while retaining QST and canonical score tables in list columns.

Usage

cs_run_seeds(
  dgp_id,
  estimator_id,
  n,
  seeds,
  version = NULL,
  status = "stable",
  tau = cs_tau_oracle,
  bootstrap = FALSE,
  B = 200L,
  config = list(),
  board = NULL,
  force = FALSE,
  skip_existing = FALSE,
  show_progress = TRUE,
  quiet = FALSE,
  max_runtime = Inf,
  parallel = FALSE,
  experimental_parallel = FALSE,
  staging_dir = NULL
)

Arguments

dgp_id

Character scalar, identifier of the DGP (e.g., "synth_baseline").

estimator_id

Character scalar, identifier of the estimator (e.g., "oracle_att").

n

Integer, number of observations to generate per seed.

seeds

Integer vector of seeds to use. Each seed produces one row in the output tibble.

version

Optional DGP version string; forwarded to cs_get_dgp().

status

Optional DGP status filter; forwarded to cs_get_dgp().

tau

Numeric vector of quantile levels. Passed through to the estimator via cs_run_single(). Default is cs_tau_oracle.

bootstrap

Logical; runner-level convenience flag. When TRUE and config$ci_method is missing, the runner sets it to "bootstrap" and also injects config$seed from each per-seed seed (see cs_ci_methods).

B

Integer; convenience alias for config$n_boot when bootstrap=TRUE. Only used if config$n_boot is missing.

config

List of estimator-specific configuration options. Passed through to the estimator via cs_run_single().

board

Optional pins board for persistence.

force

Logical; if TRUE, recompute even when pins exist (alias for setting skip_existing = FALSE).

skip_existing

Logical; whether to resume from existing pins.

show_progress

Logical; whether to display per-seed progress messages.

quiet

Logical; if TRUE, suppress DGP governance warnings inside per-seed runs (use with care; pre-flight still warns once).

max_runtime

Numeric scalar; maximum allowed runtime (seconds) per seed.

parallel

Logical; if TRUE, uses furrr/future for parallel execution.

experimental_parallel

Logical; must be TRUE to enable parallel mode.

staging_dir

Optional staging directory for crash recovery.

Value

A tibble with one row per seed. Scalar identifiers and ATT metrics are flattened; QST and canonical typed score records are retained in the qst and scores list columns.