Simulate data from latent uni/multidimensional MELSM
simulate_lmmelsm(
n,
K,
lambda,
resid,
nu,
mu_beta = NULL,
logsd_beta = NULL,
P_random_ind = NULL,
Q_random_ind = NULL,
mu_logsd_betas_cor,
mu_logsd_betas_sigma,
epsilon_cor,
zeta = NULL,
X_loc = NULL,
X_sca = NULL,
X_bet = NULL,
L2_pred_only = FALSE
)List of params (list), data (list), and df (data.frame).
Integer. Number of repeated observations per group.
Integer. Number of groups.
Matrix (FxJ). Loading matrix.
Numeric vector (J). Residual SDs.
Numeric vector (J). Intercepts.
Matrix (PxF). Location coefficient matrix.
Matrix (QxF). Scale coefficient matrix.
Integer vector (P_random). Which location predictors have random slopes.
Integer vector (Q_random). Which scale predictors have random slopes.
Matrix (Symmetric, SPD; F2 + P_randomF + Q_random*F). Correlation matrix of random effects (slopes and intercepts, for location and scale models).
Numeric vector (Positive; F2 + P_randomF + Q_random*F). RE SDs (intercepts on exponentiated scale, if zeta is specified).
Matrix (Symmetric, SPD; F). Stochastic error term correlation between factors.
Matrix (Rx[F*2 + P_random*F + Q_random*F]). Coefficient matrix for predicting RE SDs.
Matrix (Optional; NxP). Location design matrix.
Matrix (Optional; NxQ). Scale design matrix.
Matrix (Optional; NxR). Between-SD design matrix.
Logical. Whether predictors should be group-level (TRUE) or observation level (FALSE).
Stephen R. Martin