print.model_set {modelbpp}R Documentation

Print a model_set-Class Object

Description

Print the content of a model_set-class object.

Usage

## S3 method for class 'model_set'
print(
  x,
  bic_digits = 3,
  bpp_digits = 3,
  sort_models = TRUE,
  max_models = 20,
  bpp_target = NULL,
  target_name = "original",
  more_fit_measures = c("cfi", "rmsea"),
  fit_measures_digits = 3,
  short_names = FALSE,
  cumulative_bpp = FALSE,
  ...
)

Arguments

x

A model_set-class object.

bic_digits

The number of decimal places to be displayed for BIC. Default is 3.

bpp_digits

The number of decimal places to be displayed for BIC posterior probability and prior probabilities. Default is 3.

sort_models

Whether the models will be sorted by BIC posterior probability. Default is TRUE.

max_models

The maximum number of models to be printed. Default is 20.

bpp_target

The desired BIC probability. Used to compute and print the minimum prior probability of the target model required to achieve bpp_target. Default is NULL.

target_name

The name of the target model as appeared in the model list. Default is "original". Used if bpp_target is not NULL.

more_fit_measures

Character vector. To be passed to lavaan::fitMeasures(). Default is c("cfi", "rmsea"). Set it to NULL to disable printing additional fit measures.

fit_measures_digits

The number of decimal places to be displayed for additional fit measures, if requested. Default is 3.

short_names

If TRUE, then simple short names will be printed along with full model names. Default is FALSE. Short names can be used when interpreting the graph from model_graph() if short names are used in the graph.

cumulative_bpp

If TRUE and the models are sorted by BPPs, cumulative BPPs will be printed. Default is FALSE.

...

Optional arguments. Ignored.

Details

It is the print method of the output of model_set().

Value

x is returned invisibly. Called for its side effect.

Author(s)

Shu Fai Cheung https://orcid.org/0000-0002-9871-9448

See Also

A model_set-class object is generated by model_set().

Examples


library(lavaan)

dat <- dat_path_model

mod <-
"
x3 ~ a*x1 + b*x2
x4 ~ a*x1
ab := a*b
"

fit <- sem(mod, dat_path_model, fixed.x = TRUE)

out <- model_set(fit)
out


[Package modelbpp version 0.1.5 Index]