Skip to contents

Generate a treatment indicator, covariates, and a continuous outcome with both location and tail heterogeneity. The resulting structure is intended for examples involving dpmix.causal(), dpmgpd.causal(), qte(), and cqte().

Usage

sim_causal_qte(n = 300, seed = NULL)

Arguments

n

Integer sample size.

seed

Optional random seed.

Value

List with components y, t, and X; A is included as a backward-compatible alias for t.

Details

Treatment assignment is generated from a logistic propensity score $$ \Pr(T = 1 \mid X) = \operatorname{logit}^{-1}(\eta(X)), $$ and the observed outcome combines baseline covariate effects, an average treatment shift, and a covariate-dependent tail amplification for treated units. This produces data where marginal and conditional quantile effects differ across the outcome distribution.

The returned list can be converted directly into the arguments expected by the causal fitting wrappers after minor formatting.

See also