get_depth | R Documentation |
Function to calculate hierarchy depth in lavaan models
get_depth(x, model, depth = 0L, max_depth = 20)
x |
character vector of variables in a lavaan model |
model |
character, lavaan fit object, or lavaan parameter table |
depth |
initial depth |
max_depth |
max depth at which to stop (prevents infinite loops for non-recursive models) |
integer
model <- "X =~ X1 + X2"
get_depth("X", model = model)
get_depth("X1", model = model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.