R: Build the data generation template and analysis template from...
model.lavaan
R Documentation
Build the data generation template and analysis template from the lavaan result
Description
Creates a data generation and analysis template (lavaan parameter table) for simulations with the lavaan result. Model misspecification may be added into the template by a vector, a matrix, or a list of vectors or matrices (for multiple groups).
Usage
model.lavaan(object, std = FALSE, LY = NULL, PS = NULL, RPS = NULL,
TE = NULL, RTE = NULL, BE = NULL, VTE = NULL, VY = NULL, VPS = NULL,
VE=NULL, TY = NULL, AL = NULL, MY = NULL, ME = NULL, KA = NULL,
GA = NULL)
Arguments
object
A lavaan object to be used to build the data generation and analysis template.
std
If TRUE, use the resulting standardized parameters for data generation. If FALSE, use the unstandardized parameters for data generation.
LY
Model misspecification in factor loading matrix from endogenous factors to Y indicators (need to be a matrix or a list of matrices).
PS
Model misspecification in residual covariance matrix among endogenous factors (need to be a symmetric matrix or a list of symmetric matrices).
RPS
Model misspecification in residual correlation matrix among endogenous factors (need to be a symmetric matrix or a list of symmetric matrices).
TE
Model misspecification in measurement error covariance matrix among Y indicators (need to be a symmetric matrix or a list of symmetric matrices).
RTE
Model misspecification in measurement error correlation matrix among Y indicators (need to be a symmetric matrix or a list of symmetric matrices).
BE
Model misspecification in regression coefficient matrix among endogenous factors (need to be a symmetric matrix or a list of symmetric matrices).
VTE
Model misspecification in measurement error variance of indicators (need to be a vector or a list of vectors).
VY
Model misspecification in total variance of indicators (need to be a vector or a list of vectors). NOTE: Either measurement error variance or indicator variance is specified. Both cannot be simultaneously specified.
VPS
Model misspecification in residual variance of factors (need to be a vector or a list of vectors).
VE
Model misspecification in total variance of of factors (need to be a vector or a list of vectors). NOTE: Either residual variance of factors or total variance of factors is specified. Both cannot be simulatneously specified.
TY
Model misspecification in measurement intercepts of Y indicators. (need to be a vector or a list of vectors).
AL
Model misspecification in endogenous factor intercept (need to be a vector or a list of vectors).
MY
Model misspecification in overall Y indicator means. (need to be a vector or a list of vectors). NOTE: Either measurement intercept of indicator mean can be specified. Both cannot be specified simultaneously.
ME
Model misspecification in total mean of endogenous factors (need to be a vector or a list of vectors). NOTE: Either endogenous factor intercept or total mean of endogenous factor is specified. Both cannot be simultaneously specified.
KA
Model misspecification in regression coefficient matrix from covariates to indicators (need to be a matrix or a list of matrices). KA is applicable when exogenous covariates are specified only.
GA
Model misspecification in regression coefficient matrix from covariates to factors (need to be a matrix or a list of matrices). KA is applicable when exogenous covariates are specified only.
Value
SimSem object that contains the data generation template (@dgen) and analysis template (@pt).