Variable names and data column names must not contain periods. Rename them consistently, for example x.1 to x_1, and check that the new names are unique. Study, group, and cluster values may contain periods.
It fits MASEM with the one-stage MASEM (OSMASEM) approach.
osmasem(
model.name = "osmasem",
RAM = NULL,
Mmatrix = NULL,
Tmatrix = NULL,
Jmatrix = NULL,
Ax = NULL,
Sx = NULL,
A.lbound = NULL,
A.ubound = NULL,
RE.type = c("Diag", "CSymm", "HCSymm", "Symm", "Zero", "User"),
RE.User = NULL,
data,
subset.variables = NULL,
subset.rows = NULL,
intervals.type = c("z", "LB"),
mxModel.Args = NULL,
mxRun.Args = NULL,
suppressWarnings = TRUE,
silent = TRUE,
run = TRUE,
...
)osmasem2(
model.name = "osmasem2",
RAM,
data,
cor.analysis = TRUE,
RE.type.Sigma = c("Diag", "Symm", "Zero"),
RE.type.Mu = c("Symm", "Diag", "Zero"),
RE.type.SigmaMu = c("Zero", "Full"),
mean.analysis = FALSE,
startvalues = NULL,
replace.constraints = FALSE,
mxModel.Args = NULL,
run = TRUE,
subset.variables = NULL,
...
)
An object of class osmasem
A string for the model name in
mxModel.
A RAM object including a list of matrices of the model returned
from lavaan2RAM. If it is given, Mmatrix and
Tmatrix arguments will be ignored.
A list of matrices of the model implied correlation matrix
created by the create.vechsR. It is only required when RAM is
null. A named filter matrix is matched to the data by name, retaining its
parameter settings; an unnamed filter is matched by position. Its number
of rows must match the number of observed variables in the data.
A list of matrices of the heterogeneity variance-covariance
matrix created by the create.Tau2. It is only required when
RAM is null.
The Jacobian matrix of the mean structure in mxMatrix. The covariance structure is Jmatrix %&% Tau2 + Vi. If it is not given, an identity matrix will be used.
A Amatrix of a list of Amatrix with definition variables as the
moderators of the Amatrix. It is used to create the Mmatrix.
A Smatrix of a list of Smatrix with definition variables as the
moderators of the Smatrix. It is used to create the Mmatrix.
A matrix of lower bound of the Amatrix. If a scalar is
given, the lbound matrix will be filled with this scalar. Bounds from
inequalities in the lavaan syntax of RAM (see
lavaan2RAM) are applied to the parameters with those labels
in any matrix; on the Amatrix, A.lbound and A.ubound take
precedence over them when the corresponding entry is not NA; NA entries retain RAM bounds. Conflicting explicit bounds for repeated labels are rejected. Bounds on parameters that osmasem() computes
rather than estimates (e.g., error variances of dependent variables) are
ignored with a warning.
A matrix of upper bound of the Amatrix. If a scalar is given, the ubound matrix will be filled with this scalar.
Type of the random effects. See
create.Tau2 for details.
A symmetric matrix of TRUE or FALSE for the
variance component when RE.type="User". See
create.Tau2 for details.
A list of data created by the Cor2DataFrame.
A character vector of the observed variables
selected for the analysis, in any order. The analysis keeps the order of
the variables in the data. Each variable can be given only once. In
osmasem2(), it also selects the means, their sampling covariances,
and the sampling covariances between the correlations or covariances and
the means (VyMlabels, if present). Studies without any of the
selected correlations or covariances do not contribute to the fit.
A logical vector of the same length as the number of rows in the data to select which rows are used in the analysis.
Either z (default if missing) or LB. If
it is z, it calculates the 95% confidence intervals (CIs) based on
the estimated standard error. If it is LB, it calculates the 95%
likelihood-based CIs on the parameter estimates.
A list of arguments passed to
mxModel.
A list of arguments passed to mxRun.
Logical. If it is TRUE, warnings are
suppressed. This argument is passed to mxRun. If
it is FALSE, warnings during the fit are shown after it, so that
they cannot stop it. In both cases, they are stored in the warning
element of the output.
Logical. An argument is passed to mxRun
Logical. If FALSE, only return the mx model without
running the analysis.
Not used, except that osmasem() rejects
cor.analysis=FALSE; use osmasem2() for covariance data.
Whether to analyze correlation or covariance structure analysis.
Type of the random effects of the correlation or covariance vectors.
Type of the random effects of the mean vectors.
Type of the random effects between the correlation/covariance vectors and the mean vectors.
Whether to include the analysis of the mean structure.
An optional list of starting values. It is useful when there are new parameters in RAM.
It is relevant only when there are constraints in
RAM. If it is FALSE, these constraints will be imposed. If it is
TRUE, the parameters on the left-hand side will be replaced by the
algebras on the right-hand side. In osmasem2(), chained replacements
are resolved before substitution, including in remaining constraints and
defined parameters; parameter bounds are retained.
Parameters appearing only in equality expressions require substitution or
an explicit parameter matrix supplied through mxModel.Args.
For correlation analysis in osmasem2(), unit-variance restrictions
are imposed for all selected observed variables at every distinct observed
definition-variable pattern, even when a residual variance is fixed.
Algebraic identities and linearly dependent polynomial restrictions are
omitted where they can be established for an acyclic RAM, allowing for
floating-point cancellation relative to each monomial's coefficients. Small
independent terms are retained. Residual variance
specifications must be compatible with the moderator effects across studies.
Mike W.-L. Cheung <[email protected]>
osmasem() was implemented based on Jak and Cheung (2020) for
meta-analyzing correlation matrices. osmasem2() was a rewritten
version to handle correlation or covariance matrices with the means. There
are several major differences between them: 1. osmasem() allows the
use of RAM or (Mmatrix and Tmatrix), while
osmasem2() only accepts the RAM input. 2. RE.type is
used to specify the type of random effects on the correlations in
osmasem(). On the contrary, osmasem2() has three types of
random effects: correlations/covariances, means, and covariance between
correlations/covariance and means. 3. osmasem() reports the
transformed random effects in the parameter table. Users have to use
VarCorr() to obtain the heterogeneity matrix of the random effects.
In contrast, osmasem2() reports the heterogeneity matrix in the
parameter table. 4. osmasem() accepts either
intervals.type="z" or intervals.type="LB", whereas
osmasem2() only uses intervals.type="z". Thus, this argument
is removed in osmasem2(): a request for LB raises an error and z is deprecated. 5. Both functions accept linear and
nonlinear constraints and parameter functions (:=) in RAM;
only osmasem2() can substitute equality constraints into the model
with replace.constraints=TRUE.
The observed variables of RAM are matched to the data by name and
reordered to the order of the variables in the data. They must be the
variables in subset.variables if it is given, and all variables in
the data otherwise. If none of the names of the observed variables in
RAM are in the data (e.g., A1, D2, ... in RAM
and x1, x2, ... in the data) and their numbers are equal,
they are matched by position with a warning. Both functions warn if the estimated
heterogeneity matrix is not positive semidefinite, which bounds on its
variances cannot prevent when its covariances or correlations are free.
Jak, S., & Cheung, M. W.-L. (2020). Meta-analytic structural equation modeling with moderating effects on SEM parameters. Psychological Methods, 25 (4), 430-455. https://doi.org/10.1037/met0000245
Jak, S., Cheung, M. W.-L., Acar, S., & Kindred, R. (December 18, 2024). Evaluating differences in latent means across studies: Extending meta-analytic confirmatory factor analysis with the analysis of means. OSF. https://doi.org/10.31234/osf.io/35gtz.
Cor2DataFrame,
create.vechsR, create.Tau2,
create.V, osmasem,
Nohe15, issp05