Learn R Programming

SEMsensitivity (version 0.1.0)

getValue: Get the value of a specified SEM path parameter after case deletion

Description

This helper function refits the specified SEM model after dropping the given cases and extracts the parameter estimate for the specified path (e.g., var_one ~ var_two).

Usage

getValue(drops_index, df, model, var_one, var_two)

Value

A numeric scalar giving the parameter estimate for the specified path after removing the selected observations.

Arguments

drops_index

Integer vector of observation indices to drop from the data.

df

A data frame containing the dataset.

model

A lavaan SEM model specification.

var_one

Character string giving the dependent (left-hand side) variable.

var_two

Character string giving the predictor (right-hand side) variable.