Learn R Programming

modelbpp (version 0.1.6)

model_set_combined: Two or More Hypothesized Models

Description

Combine the 'model_set()' results of two or more hypothesis models.

Usage

model_set_combined(model_set_outputs, ...)

Value

A model_set-class object, which is simply an output of model_set(). All methods and functions for the output of model_set() will also work on this object.

Arguments

model_set_outputs

This must be a named list of the outputs of model_set(). The names will be used as prefixes to name the models.

...

Additional arguments to be passed to model_set().

Details

There are cases in which users have more than one hypothesized model, each with its own set of neighboring models.

The function model_set_combined() let users combine the model_set() results two or more hypothesized model. Users can then compare the BPPs of these hypothesized models, as well as their neighboring models. Equivalent models will be removed in the process.

See Also

model_set()

Examples

Run this code

library(lavaan)

mod1 <-
"
x4 ~ x1
x7 ~ x4
"

mod2 <-
"
x1 ~ x4
x7 ~ x4
"

fit1 <- sem(mod1,
            HolzingerSwineford1939,
            fixed.x = FALSE)
fit2 <- sem(mod2,
            HolzingerSwineford1939,
            fixed.x = FALSE)

out1 <- model_set(fit1)
out2 <- model_set(fit2)

out1
out2

outb <- model_set_combined(
            list(fit1 = out1,
                 fit2 = out2))

outb

Run the code above in your browser using DataLab