View source: R/compute_effects.R
ComputeEffectsLinear | R Documentation |
ComputeEffectsLinear
computes the direct and indirect effects
for linear models. These are simple functions of the path coefficients.
Argument can be path coefficients fitted to data, in format output by
ComputePath
or simulation parameters output by function such as
SimpleSim
.
ComputeEffectsLinear(fit)
fit |
List with path coefficients. |
Matrix of direct, indirect, and total effects for each xx.
set.seed(1234)
params <- SimpleSim()
dat <- SimulateData(params)
fit <- ComputePath(dat)
ComputeEffectsLinear(params) ## exact
ComputeEffectsLinear(fit) ## based on sample
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.