Skip to contents

It computes casewise residuals to be used by the plot functions.

Usage

casewise_residuals(fit, add_path = FALSE)

Arguments

fit

The output of a structural equation model analysis. Only support the output of lavaan::sem() for now.

add_path

Logical. If a path is not in a model (fixed to zero), whether this path will be added to the model #' to compute the residuals. Default is FALSE. Use this only if necessary because the model will be fitted once for each such path.

Value

A semdplot_residuals-class object.

TODO: Write methods for this class.

Details

It receives the output of structural equation model analysis (e.g, the output of lavaan::sem()) and and computes casewise residuals.

It currently only supports the output of lavaan::sem() and a single-sample model with observable variables only.

Examples

# \donttest{
# TODO: Prepare some examples.
# }