Skip to contents

The generator must return the canonical synthetic-DGP contract, including uppercase, consecutive, one-based covariates named X1, ..., Xk. Structural contract violations abort with class causalstress_dgp_error.

Usage

cs_validate_dgp(dgp_fn, n = 1000, seeds = 1:50, verbose = TRUE)

Arguments

dgp_fn

Synthetic DGP generator. Must accept n and seed.

n

Integer sample size for validation runs.

seeds

Integer vector of seeds to probe stability/sanity.

verbose

Logical; if TRUE, messages are emitted.

Value

A list with elements:

  • valid (logical): TRUE if schema and determinism checks pass.

  • cv_true_att (numeric): coefficient of variation of true ATT across seeds.

  • mean_naive_bias (numeric): average naive difference-in-means bias.

  • checks (named logical vector): individual check outcomes.