print.std_solution_boot {semhelpinghands}R Documentation

Print an 'std_solution_boot' Object

Description

Print method for an 'std_solution_boot' object, which is the output of standardizedSolution_boot_ci().

Usage

## S3 method for class 'std_solution_boot'
print(x, ..., nd = 3, output = c("table", "text"), standardized_only = TRUE)

Arguments

x

Object of the class std_solution_boot.

...

Optional arguments to be passed to print() methods.

nd

The number of digits after the decimal place. Default is 3.

output

String. How the results are printed. Default is "table" and the results are printed in a table format similar to that of lavaan::standardizedSolution(). If "text", the results will be printed in a text format similar to the printout of the output of summary() of a lavaan object.

standardized_only

Logical. If TRUE, the default, only the results for the standardized solution will be printed. If FALSE, then the standardized solution is printed alongside the unstandardized solution, as in the printout of the output of summary() of a lavaan object.

Details

The default format of the printout is that of lavaan::standardizedSolution(), which is compact but not easy to read. Users can request a format similar to that of the printout of the summary of a lavaan output by setting output to "text".

For the "text" format, users can also select whether only the standardized solution is printed (the default) or whether the standardized solution is appended to the right of the printout.

Value

x is returned invisibly. Called for its side effect.

Author(s)

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

See Also

standardizedSolution_boot_ci()

Examples

library(lavaan)
set.seed(5478374)
n <- 50
x <- runif(n) - .5
m <- .40 * x + rnorm(n, 0, sqrt(1 - .40))
y <- .30 * m + rnorm(n, 0, sqrt(1 - .30))
dat <- data.frame(x = x, y = y, m = m)
model <-
'
m ~ a*x
y ~ b*m
ab := a*b
'

# Should set bootstrap to at least 2000 in real studies
fit <- sem(model, data = dat, fixed.x = FALSE,
           se = "boot",
           bootstrap = 50)
std_out <- standardizedSolution_boot_ci(fit)
std_out
print(std_out, output = "text")
print(std_out, output = "text", standardized_only = FALSE)


[Package semhelpinghands version 0.1.11 Index]