powered by
Generates binary covariates by thresholding an AR(1) latent Gaussian, then proceeds as in sim_B.
sim_C( n = 100, p = 20, low_missing = TRUE, type = "MAR", SNP = 1.5, corr = 0.5, n_imp = 5, seed = NULL )
A list with components:
A list of complete covariate matrix and outcomes before missingness.
A list of covariate matrix and outcomes with missing values.
A list of array of imputed covariates (n_imp × n × p) and a matrix of imputed outcomes (n_imp × n).
A list of complete-case covariate matrix and outcomes.
Logical vector of true nonzero coefficient indices.
True covariance matrix used for X.
True coefficient vector.
Integer. Number of observations.
Integer. Number of covariates (columns). Takes values in {20, 40}.
Logical. If TRUE, use low missingness rates; if FALSE, higher missingness.
Character. Missingness mechanism: "MCAR" or "MAR".
Numeric. Signal-to-noise ratio controlling error variance.
Numeric. AR(1) correlation parameter
Integer. Number of multiple imputations to generate.
Integer or NULL. Random seed for reproducibility.
sim <- sim_C(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) str(sim)
Run the code above in your browser using DataLab