Package edu.cmu.tetrad.search
Class IdaCheck
java.lang.Object
edu.cmu.tetrad.search.IdaCheck
This calculates total effects and absolute total effects for an MPDAG G for all pairs distinct (x, y) of variables,
where the total effect is obtained by regressing y on x ∪ S and reporting the regression coefficient. Here, S
ranges over sets consisting of possible parents of x in G--that is, a set consisting of the parents of x in G plus
some combination of the neighbors for x in G, and excluding any children of x in G. Absolute total effects are
calculated as the abolute values of the total effects; the minimum values for these across possible parent sets is
reported as suggested in this paper:
Maathuis, Marloes H., Markus Kalisch, and Peter Bühlmann. "Estimating high-dimensional intervention effects from observational data." The Annals of Statistics 37.6A (2009): 3133-3164.
Additionally, if a linear SEM model is supplied over the same variables, a minimum squared distance is calculated of each coefficient in this IM from the interval of total effects (min to max) for the pair (x, y) for each directed edge x->y in the SEM IM. If the true total effect falls within the interval [min, max], we give a distance of 0; otherwise, we give the distance to the nearest endpoint. This distance is then squared.
We also report the averages of each statistic across all pairs of distinct nodes in the dataset.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getAverageSquaredDistance
(List<OrderedPair<Node>> pairs) Returns the average of the squared distances between the true total effects and the IDA effect ranges the list of node pairs indicated.double
getAvgMaxSquaredDiffEstTrue
(List<OrderedPair<Node>> pairs) Returns the average of the squared differences between the maximum total effects and the true total effects for the list of node pairs indicated.double
getAvgMinSquaredDiffEstTrue
(List<OrderedPair<Node>> pairs) Returns the average of the squared differences between the minimum total effects and the true total effects for the list of node pairs indicated.double
getIdaMinEffect
(Node x, Node y) Gets the signed minimum absolute total effect value between two nodes.double
getMaxTotalEffect
(Node x, Node y) Returns the maximum total effect value between two nodes.double
getMinTotalEffect
(Node x, Node y) Gets the minimum total effect value between two nodes.getNodes()
Returns a list of nodes.Retrieves a list of OrderedPair objects representing all possible pairs of distinct nodes in the graph.double
getSquaredDistance
(OrderedPair<Node> pair) Calculates the squared distance of the true total effect to the [min, max] IDA effect range of the given (x, y) node pair, for x predicting y.double
getSquaredMaxTrueDist
(OrderedPair<Node> pair) Returns the squared difference between the maximum total effect and the true total effect for the given pair of nodes.double
Returns the squared difference between the minimum total effect and the true total effect for the given pair of nodes.double
getTrueTotalEffect
(OrderedPair<Node> pair) Calculates the true total effect between two nodes in the graph.
-
Constructor Details
-
IdaCheck
-
-
Method Details
-
getTrueTotalEffect
Calculates the true total effect between two nodes in the graph.- Parameters:
pair
- the ordered pair of nodes for which the total effect is calculated.- Returns:
- the true total effect between the two nodes.
-
getNodes
-
getOrderedPairs
Retrieves a list of OrderedPair objects representing all possible pairs of distinct nodes in the graph.- Returns:
- a list of OrderedPair objects.
-
getMinTotalEffect
Gets the minimum total effect value between two nodes.- Parameters:
x
- the first node.y
- the second node.- Returns:
- the minimum total effect value between the two nodes.
- Throws:
IllegalArgumentException
- if the nodes x and y are the same.
-
getMaxTotalEffect
Returns the maximum total effect value between two nodes.- Parameters:
x
- the first node.y
- the second node.- Returns:
- the maximum total effect value between the two nodes.
- Throws:
IllegalArgumentException
- if the nodes x and y are the same.
-
getIdaMinEffect
Gets the signed minimum absolute total effect value between two nodes.- Parameters:
x
- the first node.y
- the second node.- Returns:
- the signed minimum absolute total effect value between the two nodes.
- Throws:
IllegalArgumentException
- if the nodes x and y are the same.
-
getSquaredDistance
Calculates the squared distance of the true total effect to the [min, max] IDA effect range of the given (x, y) node pair, for x predicting y. If the true effect falls within [min, max], the method returns 0. Otherwise, the squared distance to the nearest endpoint of the [min, max] range is returned.- Parameters:
pair
- the pair of nodes.- Returns:
- the squared distance between the two nodes.
-
getAverageSquaredDistance
Returns the average of the squared distances between the true total effects and the IDA effect ranges the list of node pairs indicated.- Parameters:
pairs
- the list of node pairs.- Returns:
- the average of the squared distances between the true total effects and the IDA effect ranges.
-
getSquaredMinTrueDistance
Returns the squared difference between the minimum total effect and the true total effect for the given pair of nodes.- Parameters:
pair
- the pair of nodes.- Returns:
- the squared difference between the minimum total effect and the true total effect.
-
getAvgMinSquaredDiffEstTrue
Returns the average of the squared differences between the minimum total effects and the true total effects for the list of node pairs indicated.- Parameters:
pairs
- the list of node pairs.- Returns:
- the average of the squared differences between the minimum total effects and the true total effects.
-
getSquaredMaxTrueDist
Returns the squared difference between the maximum total effect and the true total effect for the given pair of nodes.- Parameters:
pair
- the pair of nodes.- Returns:
- the squared difference between the maximum total effect and the true total effect.
-
getAvgMaxSquaredDiffEstTrue
Returns the average of the squared differences between the maximum total effects and the true total effects for the list of node pairs indicated.- Parameters:
pairs
- the list of node pairs.- Returns:
- the average of the squared differences between the maximum total effects and the true total effects.
-