print.efa_simulated: Print and format an efa_simulated object

View source: R/print.efa_simulated.R

print.efa_simulatedR Documentation

Print and format an efa_simulated object

Description

print() shows a compact summary of the data simulated by efa_simulate(): how many datasets were drawn and their dimensions, the marginal distribution, whether the data were discretized into ordered categories or given missing values, and – when model error was injected – the method with the target and achieved RMSEA and CFI. The simulated data themselves live in the data element and the population correlation matrix in population. format() returns the same summary as a character vector; print() is cat(format(x), sep = "\n"). The lines follow the active console theme, so they are plain when colours are disabled.

Usage

## S3 method for class 'efa_simulated'
print(x, digits = 3, ...)

## S3 method for class 'efa_simulated'
format(x, digits = 3, ...)

Arguments

x

An object of class efa_simulated (output from efa_simulate()).

digits

Integer. The number of decimal places the reported fit values are rounded to. Default is 3.

...

Not used; for consistency with the generic.

Value

print() returns its argument x invisibly. format() returns a character vector with the summary lines.

See Also

Other data simulation: efa_simulate()

Examples

Lambda <- population_models$loadings$baseline
Phi <- population_models$phis_3$moderate
efa_simulate(N = 500, Lambda = Lambda, Phi = Phi, target_rmsea = 0.05, seed = 42)


EFAtools documentation built on Aug. 21, 2026, 5:16 p.m.