View source: R/lavaan2lm_list.R
coef.lm_from_lavaan | R Documentation |
Returns the path
coefficients of the terms in an
lm_from_lavaan
-class object.
## S3 method for class 'lm_from_lavaan'
coef(object, ...)
object |
A 'lm_from_lavaan'-class object. |
... |
Additional arguments. Ignored. |
An lm_from_lavaan
-class
object converts a regression model
for a variable in a lavaan
-class
object to a formula
-class object.
This function simply extracts the
path coefficients estimates.
Intercept is always included, and set
to zero if mean structure is not in
the source lavaan
-class object.
This is an advanced helper used by
plot.cond_indirect_effects()
.
Exported for advanced users and
developers.
A numeric vector of the path coefficients.
lm_from_lavaan_list()
library(lavaan)
data(data_med)
mod <-
"
m ~ a * x + c1 + c2
y ~ b * m + x + c1 + c2
"
fit <- sem(mod, data_med, fixed.x = FALSE)
fit_list <- lm_from_lavaan_list(fit)
coef(fit_list$m)
coef(fit_list$y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.