estmodel(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, modelType, indLab = NULL, facLab = NULL,
groupLab = "group", ngroups = 1, con = NULL)
estmodel.cfa(LY = NULL,PS = NULL,RPS = NULL, TE = NULL,RTE = NULL, VTE = NULL,
VY = NULL, VPS = NULL, VE = NULL, TY = NULL, AL = NULL, MY = NULL, ME = NULL,
indLab = NULL, facLab = NULL, groupLab = "group", ngroups = 1, con = NULL)
estmodel.path(PS = NULL, RPS = NULL, BE = NULL, VPS = NULL, VE = NULL, AL = NULL,
ME = NULL, indLab = NULL, facLab = NULL, groupLab = "group", ngroups = 1,
con = NULL)
estmodel.sem(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, indLab = NULL, facLab = NULL, groupLab = "group", ngroups = 1,
con = NULL)
y1
, y2
, ... yy
.f1
, f2
, ... ff
group
SimSem
object that contains the data generation template (@dgen
) and analysis template (@pt
).modelType="CFA"
, LY
is required. As the default, the on-diagonal elements of PS
are fixed as 1 and the off-diagonal elements of PS
are freely estimated. The off-diagonal elements of TE
are freely estimated and the off-diagonal elements of TE
are fixed to 0. The AL
elements are fixed to 0. The TY
elements are freely estimated.
For modelType="Path"
, BE
is required. As the default, the on-diagonal elements of PS
are freely estimated, the off-diagonal elements between exogenous variables (covariance between exogenous variables) are freely estimated, and the other off-diagonal elements are fixed to 0. The AL
elements are freely estimated.
For modelType="SEM"
, LY
and BE
are required. As the default, the on-diagonal elements of PS
are fixed to 1, the off-diagonal elements between exogenous factors (covariance between exogenous factors) are freely estimated, and the other off-diagonal elements are fixed to 0. The off-diagonal elements of TE
are freely estimated and the off-diagonal elements of TE
are fixed to 0. The AL
elements are fixed to 0. The TY
elements are freely estimated.
The estmodel.cfa
, estmodel.path
, and estmodel.sem
are the shortcuts for the estmodel
function when modelType
are "CFA"
, "Path"
, and "SEM"
, respectively.loading <- matrix(0, 12, 4)
loading[1:3, 1] <- NA
loading[4:6, 2] <- NA
loading[7:9, 3] <- NA
loading[10:12, 4] <- NA
CFA.Model <- estmodel(LY = loading, modelType = "CFA")
path <- matrix(0, 4, 4)
path[3, 1:2] <- NA
path[4, 3] <- NA
Path.Model <- estmodel(BE = path, modelType = "Path")
SEM.Model <- estmodel(BE = path, LY = loading, modelType="SEM")
# Shortcut
CFA.Model <- estmodel.cfa(LY = loading)
Path.Model <- estmodel.path(BE = path)
SEM.Model <- estmodel.sem(BE = path, LY = loading)
Run the code above in your browser using DataLab