Generate scalar covariates of various types for use in simulations.
generate_scalar_covariate(n, type = "normal", levels = 3, seed = NULL)For "normal" or "uniform": numeric vector of length n. For "factor": factor of length n.
Integer, number of observations.
Character string specifying distribution: "normal", "uniform", or "factor".
For type = "factor", integer number of factor levels (default 3).
Optional integer seed for reproducibility within this call.