print.sbt_std_boot {semboottools} | R Documentation |
Print a 'sbt_std_boot' Object
Description
Print method for a
'sbt_std_boot' object, which
is the output of
standardizedSolution_boot()
.
Usage
## S3 method for class 'sbt_std_boot'
print(
x,
...,
nd = 3,
output = c("lavaan.printer", "text", "table"),
standardized_only = TRUE,
boot_ci_only = FALSE,
drop_cols = "Z"
)
Arguments
x |
Object of the class
|
... |
Optional arguments to be
passed to |
nd |
The number of digits after the decimal place. Default is 3. |
output |
String. How the results
are printed. If set to |
standardized_only |
Logical.
If |
boot_ci_only |
Logical. Whether
only bootstrap confidence intervals
are printed. If |
drop_cols |
The name(s) of the
column(s) to drop
if output format is |
Details
The default format of the printout,
"lavaan.printer"
,
is a compact version of the lavaan-style
printout, generated by lavaan.printer
.
Alternatively, users can request a format
similar to that of the printout
of the summary of a lavaan
output
by setting output
to "text"
. This
format can be used if "lavaan.printer"
failed.
Users can also print the content just
as a data frame by setting output
to "table"
. Not easy to read much
more compact.
For the "text"
or "lavaan.printer"
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
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(fit)
std_out
print(std_out, standardized_only = FALSE)