print.stdmod_lavaan {stdmod}R Documentation

Print a 'stdmod_lavaan' Class Object

Description

Print the output of stdmod_lavaan().

Usage

## S3 method for class 'stdmod_lavaan'
print(x, conf = 0.95, nd = 3, ...)

Arguments

x

The output of stdmod_lavaan().

conf

If nonparametric bootstrapping has been conducted by stdmod_lavaan(), this is the level of confidence in proportion (.95 denotes 95%), of the confidence interval. Default is .95.

nd

The number of digits to be printed.

...

Optional arguments. Ignored.

Value

x is returned invisibly.

Author(s)

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

Examples


# Load a test data of 500 cases

dat <- test_mod1
library(lavaan)

mod <-
"
med ~ iv + mod + iv:mod + cov1
dv ~ med + cov2
"
fit <- sem(mod, dat)
coef(fit)

# Compute the standardized moderation effect
out_noboot <- stdmod_lavaan(fit = fit,
                            x = "iv",
                            y = "med",
                            w = "mod",
                            x_w = "iv:mod")
out_noboot

# Compute the standardized moderation effect and
# its percentile confidence interval based on nonparametric bootstrapping
# Fit the model with bootstrap confidence intervals
# At least 2000 bootstrap samples should be used
# in real research. 50 is used here only for
# illustration.
fit <- sem(mod, dat, se = "boot", bootstrap = 50,
           iseed = 89574)
out_boot <- stdmod_lavaan(fit = fit,
                          x = "iv",
                          y = "med",
                          w = "mod",
                          x_w = "iv:mod",
                          boot_ci = TRUE)

out_boot



[Package stdmod version 0.2.10 Index]