View source: R/tpc_cons_intern.R
tpc.cons.intern | R Documentation |
Like pcalg::pc.cons.intern
, but takes into account the
user-specified partial node/variable ordering.
tpc.cons.intern( sk, suffStat, indepTest, alpha, version.unf = c(NA, NA), maj.rule = FALSE, forbEdges = NULL, tiers = NULL, context.all = NULL, context.tier = NULL, verbose = FALSE )
sk |
A skeleton object as returned from |
suffStat |
Sufficient statistic: List containing all relevant elements for the conditional independence decisions. |
indepTest |
Pre-defined |
alpha |
Significance level for the individual conditional independence tests. |
version.unf |
Vector of length two. If |
maj.rule |
Logical indicating if the triples are checked for ambiguity using the majority rule idea, which is less strict than the standard conservative method. |
forbEdges |
A logical matrix of dimension |
tiers |
Numeric vector specifying the tier / time point for each variable. A smaller number corresponds to an earlier tier / time point. |
context.all |
Numeric or character vector. Specifies the positions or names of global context variables. Global context variables have no incoming edges, i.e. no parents, and are themselves parents of all non-context variables in the graph. |
context.tier |
Numeric or character vector. Specifies the positions or names of tier-specific context variables. Tier-specific context variables have no incoming edges, i.e. no parents, and are themselves parents of all non-context variables in the same tier. |
verbose |
Logical asking for detailed output. |
See pcalg::pc.cons.intern
for further information on the
majority and conservative approaches to learning v-structures.
Specifying a tier for each variable using the tier
argument has the
following effects:
1) Only those triples x-y-z
are considered as potential v-structures that
satisfy t(y)=max(t(x),t(z))
. This allows for three constellations: either y
is
in the same tier as x
and both are later than z
, or y
is in the same tier as z
and both are later than x
, or all three are in the same tier. Triples where y
is
earlier than one or both of x
and z
need not be considered, as y
being a
collider would be against the partial ordering. Triples where y
is later than
both x
and z
will be oriented later in the pc algorithm and are left out here to
minimize the number of conditional independence tests.
2) Conditional independence testing is restricted such that if x
is in tier t(x)
and y
is in t(y)
, only those variables are allowed in the conditioning set whose
tier is not larger than t(x)
.
Context variables specified via context.all
or context.tier
are
not considered as candidate colliders or candidate parents of colliders.
numeric vector of triples coded as numbers (via pcalg::triple2numb
)
that were marked as ambiguous.
The updated skeleton-object (separating sets might have been updated).
Original code by Markus Kalisch and Diego Colombo. Modifications by Janine Witte.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.