Learn R Programming

wsMed (version 1.0.2)

MCDefWrapper: Process Monte Carlo Samples for Defined Parameters in SEM

Description

A wrapper for the internal .MCDef() function from the semmcci package. This function processes Monte Carlo samples to compute defined parameters for structural equation modeling (SEM).

Usage

MCDefWrapper(object, thetahat, thetahatstar_orig)

Value

A matrix of computed defined parameters for each Monte Carlo sample.

Arguments

object

A fitted lavaan SEM model object.

thetahat

A numeric vector of parameter estimates.

thetahatstar_orig

A matrix of Monte Carlo samples, where rows represent samples and columns represent parameters.

Details

This function takes Monte Carlo samples of parameter estimates and a fitted SEM model object to compute the defined parameters (e.g., indirect effects or user-defined contrasts) based on the model syntax. It is particularly useful for examining derived quantities in SEM analyses using Monte Carlo methods.

See Also

MCMI2(), RunMCMIAnalysis()