Learn R Programming

pcalg (version 1.1-4)

pc.cons.intern: Internal function for conservative PC algorithm

Description

This function is not intended for direct useage. Use pc or fci using options for the conservative version of the algorithms instead.

For any unshielded triple A-B-C, consider all subsets D of the neighbors of A and of the neighbors of C, and record the sets D for which A and C are conditionally independent given D. If B is in none of these sets, do nothing (it is a v-structure). If B is in all sets, do nothing (it is not a v-structure). If B is in some but not all sets, mark the triple as unfaithful.

Usage

pc.cons.intern(sk, suffStat, indepTest, alpha, verbose = FALSE,
               version.unf = c(NA, NA))

Arguments

sk
an object as returned from skeleton().
suffStat
sufficient statistic: List containing all necessary elements for the conditional independence decisions in the function indepTest.
indepTest
predefined function for testing conditional independence. The function is internally called as indepTest(x,y,S,suffStat), and tests conditional independence of x and y given S. Here, x<
alpha
significance level for the individual conditional independence tests.
verbose
If TRUE, detailed output is provided.
version.unf
vector of length two. First argument: Consider the case, where a indep c given S in the skeleton; furthermore, suppose that a and c are dependent given every subset of the neigbors in the conservative step; then, some error must have occured i

Value

  • unfTriplVector with triples (coded as number using triple2numb) that were marked as unfaithful.
  • versVector containing the version (1 or 2) of the corresponding triple saved in unfTripl (1=normal unfaithful triple that is, B is in some sepsets but not all or none; 2=triple coming from version.unf[1]==2 that is a and c are indep given the initial sepset but there doesn't exist a subset of the neighbours that d-separates them.)

See Also

skeleton for estimating a skeleton using the PC algorithm; pc for estimating a CPDAG using the PC algorithm; fci for computing the FCI algorithm.