Return the proportion of effect mediated in the output of indirect_proportion().
## S3 method for class 'indirect_proportion'coef(object,...)
Arguments
object: The output of indirect_proportion()
...: Not used.
Returns
A scalar: The proportion of effect mediated.
Details
It extracts and returns the element proportion in the input object.
Examples
library(lavaan)dat <- data_med
head(dat)mod <-"
m ~ x + c1 + c2
y ~ m + x + c1 + c2
"
fit <- sem(mod, dat, fixed.x =FALSE)out <- indirect_proportion(x ="x", y ="y", m ="m", fit = fit)out
coef(out)