Learn R Programming

EFAtools (version 1.1.0)

print.efa_simulated: 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 efa_simulated
print(x, digits = 3, ...)

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

Value

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

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.

See Also

Other data simulation: efa_simulate()

Examples

Run this code
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)

Run the code above in your browser using DataLab