Nonlinear heteroskedastic synthetic DGP for CausalStress (v1.3.0)
Source:R/dgp-synth-nonlinear-heteroskedastic.R
dgp_synth_nonlinear_heteroskedastic_v130.RdImplements the synth_nonlinear_heteroskedastic design from the
DGP registry. This DGP has nonlinear baseline outcome, constant
treatment effect, and heteroskedastic Gaussian noise.
Usage
dgp_synth_nonlinear_heteroskedastic_v130(
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.
Details
Goal: Test curve fitting and variance adaptation.
Covariates: \(X \in \mathbb{R}^4\).
\(X_1, X_2 \sim \mathcal{N}(0,1)\).
\(X_3 \sim \mathcal{U}[-2, 2]\).
\(X_4 \sim \mathrm{Bernoulli}(0.4)\).
Outcome: \(Y_0 = 1 + 0.8 \sin(X_1) + 0.5 X_2^2 - 0.3 X_4\).
Treatment effect: \(\tau(X) = 1.0\) (constant).
Noise: Gaussian with heteroskedastic scale \(\varepsilon \sim \mathcal{N}(0, \sigma(X)^2)\) where \(\sigma(X) = 0.3 + 0.2 |X_3|\).
Propensity: \(p(X) = \mathrm{plogis}(0.5 X_1 - 0.5 X_2)\).