View source: R/indirect_proportion.R
coef.indirect_proportion | R Documentation |
Return the proportion
of effect mediated in the output of
indirect_proportion()
.
## S3 method for class 'indirect_proportion'
coef(object, ...)
object |
The output of
|
... |
Not used. |
It extracts and returns the
element proportion
in the input
object.
A scalar: The proportion of effect mediated.
indirect_proportion()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.