Simulate a Gaussian Mixture Dataset with a Mixed-Missingness Mechanism (MAR + MCAR)
simulate_mixed_missingness(
n = 500,
pi,
mu,
sigma,
xi0 = 2,
xi1 = 3,
alpha = 0.1,
seed_id = 123
)A list with:
data: data.frame with columns x1..xp, en, missing, label, truth
true_setup: list(pi, mu, sigma)
groups: list(mar_group, obs_group, mcar_in_mar, mcar_in_obs)
probs: vector prob_mar
raw: original rmix output dat augmented with en and labels
Integer; sample size.
Numeric vector; mixing proportions (sum to 1).
Matrix (p x K); component means, columns = components.
Array (p x p x K); component covariance matrices.
Numeric; MAR logit intercept.
Numeric; MAR logit slope on entropy.
Numeric in [0,1]; MCAR rate applied within both MAR and observed groups.
Integer; seed passed to rmix() (your generator).
Requires user-provided functions:
rmix(n, pi, mu, sigma, seed_number)
get_entropy(dat, n, p, g, paralist)
Missingness mechanism codes:
0 = fully observed
1 = MCAR
2 = MAR (entropy-based)