Skip to contents

Version bump that hardens nonlinearity and heteroskedasticity to reliably stress OLS and other linear smoothers.

Usage

dgp_synth_nonlinear_heteroskedastic_v140(
  n,
  seed = NULL,
  include_truth = TRUE,
  oracle_only = FALSE
)

Arguments

n

Integer, number of observations.

seed

Optional seed for reproducibility (passed to cs_set_rng()).

include_truth

Logical; if TRUE, include oracle truth tables where supported.

oracle_only

Logical; if TRUE, return only columns needed for oracle truth generation where supported.

Value

A list with df, true_att, true_qst, and meta satisfying the synthetic DGP contract.

Details

Outcome (control): \(\mu_0(X) = 1 + 0.5 X_1^3 + 1.5 X_2^2 - 1.0 X_4\).

Noise: \(\varepsilon \sim \mathcal{N}(0, \sigma(X)^2)\) where \(\sigma(X) = 0.1 + 1.0 \exp(0.5 X_2)\).

Propensity: \(p(X) = \mathrm{plogis}(1.5 X_1 - 1.5 X_2)\) (stronger selection).