Skip to contents

Deprecated. Use model_fit() for a model fitted to a single correlation matrix or path_model() for a model fitted after meta-analytic synthesis.

Usage

c_mat_ft(model_input, R)

Arguments

model_input

Model input as a character string. Multiple models need to be on their own line. Regression syntax uses a lavaan-like outcome ~ predictor1 + predictor2 form.

R

A named correlation matrix, typically the pooled correlation matrix extracted from a fitted mars object.

Value

A list containing the directed-effects matrix, residual covariance matrix, implied correlation matrix, multiple-\(R^2\) values, number of free parameters, and model degrees of freedom.

Details

This helper builds the RAM-style matrices used by observed-variable path models. Directed paths are stored in A_mat; residual variances and exogenous covariances are stored in S_mat; and the implied correlation matrix is computed as \((I - A)^{-1} S (I - A)^{-T}\).