
# Additional Issues

## Customize Control Variables

If the control variables for the
regression models are different, we can
set `cov` to a named list. The names are
the variables with control variables,
and the element under each name is
a character vector of the control variables.

For example,

- If we set `cov` to `list(m1 = "c1", m2 = "c2", y = c("c1", "c2"))`,
  then only `c1` is included in predicting `m1`,
  only `c2` is included in predicting `m2`,
  while both `c1` and `c2` are included
  in predicting `y`.

A variable that does not appear in the
list does not have control variables.

## Customize The Printout

The `print` method of the output of
the quick mediation functions have
arguments for customizing the output.
These are arguments that likely may be
used:

- `digits`: The number of digits after
  the decimal place for most results.
  Default is 4.

- `pvalue_digits`: The number of digits
  after the decimal place for *p*-values.
  Default is 4.

See the help page of `print.q_mediation()`
for other arguments.

## Speed and Parallel Processing

By default, parallel processing is used.
If this failed for some reasons,
add `parallel` to `FALSE`. It will take
longer, sometimes much long, to run
if `parallel` is set to `FALSE`. Therefore,
use parallel processing whenever possible.

## Progress Bar

By default, a progress bar will be displayed
when doing bootstrapping. This can be
disabled by adding `progress = FALSE`.

## Workflow

The quick functions are simply functions
to do the following tasks internally:

- Fit all the models by SEM
  using `lavaan::sem()`.

- Call `all_indirect_paths()` to
  identify all indirect paths.

- Call `many_indirect_effects()` to
 compute all indirect effects and
 form their confidence intervals.

- Call `total_indirect_effect()` to
 compute the total indirect effect.

Therefore, all the tasks they do can be
done manually by the functions above.
These all-in-one functions are developed just
as convenient functions to do all these
tasks in one call.

See this
[article](./med_lav.html)
for computing and testing indirect effects
for more complicated models.