- x
Character. The name of the
predictor at the start of the path.
- y
Character. The name of the
outcome variable at the end of the
path.
- m
A vector of the variable
names of the mediator(s). The path
goes from the first mediator
successively to the last mediator. If
NULL
, the default, the path goes
from x
to y
.
- fit
The fit object. Currently
only supports lavaan::lavaan
objects. Support for lists of lm()
output is implemented by high level
functions such as indirect_effect()
and cond_indirect_effects()
.
It can also be
a lavaan.mi
object
returned by
semTools::runMI()
or
its wrapper, such as semTools::sem.mi()
.
- est
The output of
lavaan::parameterEstimates()
. If
NULL
, the default, it will be
generated from fit
. If supplied,
fit
will be ignored.
- implied_stats
Implied means,
variances, and covariances of
observed variables and latent
variables (if any), of the form of
the output of lavaan::lavInspect()
with what
set to "implied"
, but
with means extracted with what
set
to "mean.ov"
and "mean.lv"
. The
standard deviations are extracted
from this object for standardization.
Default is NULL
, and implied
statistics will be computed from
fit
if required.
- wvalues
A numeric vector of
named elements. The names are the
variable names of the moderators, and
the values are the values to which
the moderators will be set to.
Default is NULL
.
- standardized_x
Logical.
Whether x
will be standardized.
Default is FALSE
.
- standardized_y
Logical.
Whether y
will be standardized.
Default is FALSE
.
- computation_digits
The number
of digits in storing the computation
in text. Default is 3.
- prods
The product terms found.
For internal use.
- get_prods_only
IF TRUE
, will
quit early and return the product
terms found. The results can be
passed to the prod
argument when
calling this function. Default is
FALSE
. For internal use.
- data
Data frame (optional). If
supplied, it will be used to identify
the product terms. For internal use.
- expand
Whether products of
more than two terms will be searched.
TRUE
by default. For internal use.
- warn
If TRUE
, the default,
the function will warn against
possible misspecification, such as
not setting the value of a moderator
which moderate one of the component
path. Set this to FALSE
will
suppress these warnings. Suppress
them only when the moderators are
omitted intentionally.
- allow_mixing_lav_and_obs
If
TRUE
, it accepts a path with both
latent variables and observed
variables. Default is TRUE
.
- group
Either the group number
as appeared in the summary()
or lavaan::parameterEstimates()
output of an lavaan
-class object,
or the group label as used in
the lavaan
-class object.
Used only when the number of
groups is greater than one. Default
is NULL.
- est_vcov
A list of
variance-covariance matrix of
estimates, one for each response
variable (y
-variable). Used only
for models fitted by stats::lm()
for now. It is used to compute the
standard error for a path with no
mediator, and both x
and y
are
not standardized.
- df_residual
A numeric
vector of the residual degrees of
freedom for the model of each
response variable (y
-variable).
Used only for models fitted by
stats::lm()
for now. It is used to
compute the p-value and confidence
interval for a path with no mediator
and both x
and y
are not
standardized.