# Technical Appendix: Workflow of `cond_indirect()`

#### Shu Fai Cheung & Sing-Hang Cheung

Source:`vignettes/articles/manymome_cond_indirect_and_friends_workflow.Rmd`

`manymome_cond_indirect_and_friends_workflow.Rmd`

## Goal

This technical appendix describes how `cond_indirect()`

from the package manymome (Cheung & Cheung,
2023) works internally to extract the parameters and compute a
conditional indirect effect.

## Notes

### Latent variables

If all variables along a path are latent variables, product term(s) must be identified by their names because raw scores are not available.

Default uses `"_x_"`

. For example, `f1_x_f2`

is
the product term between `f1`

and `f2`

.

### Extracting Point Estimates and Variance-Covariance Matrix

When the point estimates or variance-covariance matrix of the point
estimates are needed, they will be extracted internally using functions
developed for the fit object, which can be a `lavaan`

-class
object, a list of the outputs from `stats::lm()`

, or a
`lavaan.mi`

-class object generated by fitting a model to
several datasets using multiple imputation.

## Reference

Cheung, S. F., & Cheung, S.-H. (2023). *manymome*: An R
package for computing the indirect effects, conditional effects, and
conditional indirect effects, standardized or unstandardized, and their
bootstrap confidence intervals, in many (though not all) models.
*Behavior Research Methods*. https://doi.org/10.3758/s13428-023-02224-z