Draws potential outcomes from a one-boundary inflated beta regression
(gamlss.dist::BEZI, inflation at zero) with a confounded treatment
assignment, the data-generating process used in the simulation study of
Ospina (2026). Useful for testing bic_gcomp(), bic_curvature() and
friends against a model where the true average treatment effect and its
discrete/continuous components are known in closed form.
Arguments
- n
Sample size.
- gamma
Numeric length-3 vector
(gamma0, gamma1, gammaT), the inflation-probability (logit) linear predictor coefficients for intercept, covariateW1and treatment.- beta
Numeric length-3 vector
(beta0, beta1, betaT), the continuous-mean (logit) linear predictor coefficients for intercept, covariateW2and treatment.- phi
Precision of the continuous beta component (constant).
- rho
Confounding strength: treatment is drawn with probability
plogis(rho * (W1 + W2)), sorho = 0is a randomized experiment andrho > 0confounds treatment with the covariates that also drive the outcome.- seed
Optional seed for reproducibility.
Value
A data.frame with columns y (observed response), T
(treatment), W1, W2 (covariates), and attributes "truth" (a list
with the population tau, tau_alpha, tau_mu) and "params" (the
generating coefficients).
Examples
dat <- simulate_bic(500, seed = 1)
attr(dat, "truth")
#> $tau
#> [1] 0.04573403
#>
#> $tau_alpha
#> [1] -0.08662263
#>
#> $tau_mu
#> [1] 0.1323567
#>
