Print method for a
'sbt_ustd_boot' object, which
is the output of
parameterEstimates_boot().
Arguments
- x
Object of the class
sbt_ustd_boot, the output ofparameterEstimates_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. If set to
"table", the results are printed in a table format similar to that oflavaan::parameterEstimates(). If set to"text", the results will be printed in a text format similar to the printout of the output ofsummary()of a 'lavaan'-class object. If set to"lavaan.printer", the default,lavaan.printerwill be used to print a more compact version of the"text"output.- drop_cols
The name(s) of the column(s) to drop if output format is
"lavaan.printer". Default is"Z", to fit the print out to the usual screen width of 80.
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.
Author
Shu Fai Cheung https://orcid.org/0000-0002-9871-9448
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)
fit <- store_boot(fit,
do_bootstrapping = TRUE,
R = 100,
iseed = 1234)
est <- parameterEstimates_boot(fit)
#> Warning: The number of bootstrap samples (100) is less than 'boot_pvalue_min_size' (1000). Bootstrap p-values are not computed.
est
#>
#> Bootstrapping:
#>
#> Valid Bootstrap Samples: 100
#> Level of Confidence: 95.0%
#> CI Type: Percentile
#>
#> Parameter Estimates Settings:
#>
#> Standard errors: Standard
#> Information: Expected
#> Information saturated (h1) model: Structured
#>
#> Regressions:
#> Estimate SE p CI.Lo CI.Up bSE bCI.Lo bCI.Up
#> m ~
#> x (a) 0.569 0.343 0.097 -0.103 1.240 0.326 -0.054 1.276
#> y ~
#> m (b) 0.219 0.153 0.153 -0.081 0.519 0.151 -0.060 0.572
#>
#> Variances:
#> Estimate SE p CI.Lo CI.Up bSE bCI.Lo bCI.Up
#> .m 0.460 0.092 0.000 0.280 0.641 0.093 0.248 0.673
#> .y 0.570 0.114 0.000 0.347 0.794 0.104 0.386 0.806
#> x 0.078 0.016 0.000 0.048 0.109 0.012 0.052 0.106
#>
#> Defined Parameters:
#> Estimate SE p CI.Lo CI.Up bSE bCI.Lo bCI.Up
#> ab (ab) 0.125 0.115 0.279 -0.101 0.350 0.135 -0.027 0.446
#>
#> Footnote:
#> - SE: Original standard errors.
#> - p: Original p-values.
#> - CI.Lo, CI.Up: Original confidence intervals.
#> - bSE: Bootstrap standard errors.
#> - bCI.Lo, bCI.Up: Bootstrap confidence intervals.