simulate_lmmelsm | R Documentation |
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 )
n |
Integer. Number of repeated observations per group. |
K |
Integer. Number of groups. |
lambda |
Matrix (FxJ). Loading matrix. |
resid |
Numeric vector (J). Residual SDs. |
nu |
Numeric vector (J). Intercepts. |
mu_beta |
Matrix (PxF). Location coefficient matrix. |
logsd_beta |
Matrix (QxF). Scale coefficient matrix. |
P_random_ind |
Integer vector (P_random). Which location predictors have random slopes. |
Q_random_ind |
Integer vector (Q_random). Which scale predictors have random slopes. |
mu_logsd_betas_cor |
Matrix (Symmetric, SPD; F2 + P_randomF + Q_random*F). Correlation matrix of random effects (slopes and intercepts, for location and scale models). |
mu_logsd_betas_sigma |
Numeric vector (Positive; F2 + P_randomF + Q_random*F). RE SDs (intercepts on exponentiated scale, if zeta is specified). |
epsilon_cor |
Matrix (Symmetric, SPD; F). Stochastic error term correlation between factors. |
zeta |
Matrix ( |
X_loc |
Matrix (Optional; NxP). Location design matrix. |
X_sca |
Matrix (Optional; NxQ). Scale design matrix. |
X_bet |
Matrix (Optional; NxR). Between-SD design matrix. |
L2_pred_only |
Logical. Whether predictors should be group-level (TRUE) or observation level (FALSE). |
List of params (list), data (list), and df (data.frame).
Stephen R. Martin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.