Learn R Programming

manymome (version 0.2.7)

print.all_paths: Print 'all_paths' Class Object

Description

Print the content of 'all_paths'-class object, which can be generated by all_indirect_paths().

Usage

# S3 method for all_paths
print(x, ...)

Value

x is returned invisibly. Called for its side effect.

Arguments

x

A 'all_paths'-class object.

...

Optional arguments.

Details

This function is used to print the paths identified in a readable format.

See Also

all_indirect_paths()

Examples

Run this code
library(lavaan)
data(data_serial_parallel)
mod <-
"
m11 ~ x + c1 + c2
m12 ~ m11 + x + c1 + c2
m2 ~ x + c1 + c2
y ~ m12 + m2 + m11 + x + c1 + c2
"
fit <- sem(mod, data_serial_parallel,
           fixed.x = FALSE)
# All indirect paths
out1 <- all_indirect_paths(fit)
out1

Run the code above in your browser using DataLab