localCI.test: Conditional Independence (CI) local tests of an acyclic graph

View source: R/semFit.R

localCI.testR Documentation

Conditional Independence (CI) local tests of an acyclic graph

Description

P-values of one minimal testable implication (with the smallest possible conditioning set) is returned per missing edge given an acyclic graph (DAG or BAP) using the function impliedConditionalIndependencies plus the function localTests from package dagitty. Without assuming any particular dependence structure, the p-values of every CI test, in a DAG (BAP), is then combined using the Bonferroni’s statistic in an overall test of the fitted model, B = K*min(p1,...,pK), as reviewed in Vovk & Wang (2020).

Usage

localCI.test(graph, data, bap = FALSE, limit = 100, verbose = TRUE, ...)

Arguments

graph

A directed graph as an igraph object.

data

A data matrix with subjects as rows and variables as columns.

bap

If TRUE, the input graph is trasformend in a BAP, if FALSE (defult) the input graph is reduced in a DAG.

limit

An integer value corresponding to the size of the extracted acyclic graph. Beyond this limit, switch to Shipley's C-test (Shipley 2000) is enabled to reduce the computational burden. By default, limit = 100.

verbose

If TRUE, LocalCI results will be showed to screen (default = TRUE).

...

Currently ignored.

Value

A list of three objects: (i) "dag": the DAG used to perform the localCI test (ii) "msep": the list of all m-separation tests over missing edges in the input graph and (iii) "mtest":the overall Bonferroni's P-value.

Author(s)

Mario Grassi mario.grassi@unipv.it

References

Vovk V, Wang R (2020). Combining p-values via averaging. Biometrika 107(4): 791-808. <https://doi.org/10.1093/biomet/asaa027>

Shipley B (2000). A new inferential test for path models based on DAGs. Structural Equation Modeling, 7(2): 206-218. <https://doi.org/10.1207/S15328007SEM0702_4>

Examples


# Nonparanormal(npn) transformation
als.npn <- transformData(alsData$exprs)$data

sem <- SEMrun(alsData$graph, als.npn)
B_test <- localCI.test(sem$graph, als.npn, verbose = TRUE)


SEMgraph documentation built on Sept. 11, 2024, 8:36 p.m.