View source: R/compute_effects.R
ComputePath | R Documentation |
ComputePath
computes the coefficients for for all paths linking
response, mediators, treatment and potential confounders.
ComputePath(dat, reg = FALSE, mmn = FALSE)
dat |
List containing data (see SimulateData for format) |
reg |
Should path coefficient estimates be regularized. Experimental. Defaults to FALSE. |
mmn |
Should residuals from mm | xx regression be returned. If FALSE return NULL. Must be true if estimating direct/indirect effects with graph structure. |
List containing path coefficients, variance estimates, residuals.
params <- SimpleSim()
dat <- SimulateData(params)
fit <- ComputePath(dat)
print(fit$xx_direct)
print(params$xx_direct)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.