ref_models: Define saturated and independence models

View source: R/model_misc.R

ref_modelsR Documentation

Define saturated and independence models

Description

A function to define and run two reference models: Saturated and Independence. The reference models are stored in the options slot of the target model.

Usage

ref_models(model, ref_models = NULL, run = TRUE, ...)

get_ref_models(model)

Arguments

model

MxModel object

ref_models

a named list of length two of MxModels (Saturated and Independence). If NULL, mxRefModels is used to define reference models.

run

should we fit the reference models? Default is TRUE.

...

arguments passed to mxRefModels.

Value

the original model with two reference models appended in the option slot.

Note

If you provide the list with two reference models, the models have to be stored as 'Saturated' and 'Independence' object within this list. Otherwise they will be thrown away.

The reference models summarize the data, so don't forget to update the reference models if you modify the data.


IvanVoronin/TwinAnalysis documentation built on July 24, 2024, 9:36 p.m.