pathFinder | R Documentation |
This function uses SEMace
to find
significant causal effects between source-sink pairs and
SEMpath
to fit them and test their edge
perturbation.
pathFinder(
graph,
data,
group = NULL,
ace = NULL,
path = "directed",
method = "BH",
alpha = 0.05,
...
)
graph |
Input network as an igraph object. |
data |
A matrix or data.frame. Rows correspond to subjects, and columns to graph nodes (variables). |
group |
group A binary vector. This vector must be as long as the
number of subjects. Each vector element must be 1 for cases and 0
for control subjects. Group specification enables edge perturbation
testing. By default, |
ace |
A data.frame generated by |
path |
If |
method |
Multiple testing correction method. One of the values
available in |
alpha |
Significance level for ACE selection (by default,
|
... |
Currently ignored. |
A list of 3 objects:
"paths", list of paths as igraph objects;
"fit", fitting results for each path as a lavaan object;
"dfp", a data.frame containing SEM global fitting statistics.
Fernando Palluzzi fernando.palluzzi@gmail.com
# Find and evaluate significantly perturbed paths
# Nonparanormal(npn) transformation
als.npn <- transformData(alsData$exprs)$data
adjData <- SEMbap(alsData$graph, als.npn)$data
paths <- pathFinder(alsData$graph, adjData,
group = alsData$group,
ace = NULL)
print(paths$dfp)
head(parameterEstimates(paths$fit[[1]]))
gplot(paths$paths[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.