Class IndTestMvpLrt

java.lang.Object
edu.cmu.tetrad.search.test.IndTestMvpLrt
All Implemented Interfaces:
IndependenceTest

public class IndTestMvpLrt extends Object implements IndependenceTest

Performs a test of conditional independence X _||_ Y | Z1...Zn where all variables are either continuous or discrete. This test is valid for both ordinal and non-ordinal discrete searchVariables.

Andrews, B., Ramsey, J., invalid input: '&' Cooper, G. F. (2018). Scoring Bayesian networks of mixed variables. International journal of data science and analytics, 6, 3-18.

Author:
Bryan Andrews
  • Constructor Details

    • IndTestMvpLrt

      public IndTestMvpLrt(DataSet data, double alpha, int fDegree, boolean discretize)
      Constructor.
      Parameters:
      data - The mixed continuous/discrete dataset.
      alpha - The significance level.
      fDegree - The f degree.
      discretize - True if continuous children should be discretized.
  • Method Details

    • indTestSubset

      public IndependenceTest indTestSubset(List<Node> vars)
      Returns an independence test for a sublist of the searchVariables.
      Specified by:
      indTestSubset in interface IndependenceTest
      Parameters:
      vars - The sublist of variables.
      Returns:
      this test.
      See Also:
    • checkIndependence

      public IndependenceResult checkIndependence(Node x, Node y, List<Node> z)
      Returns an independence result for x _||_ y | z.
      Specified by:
      checkIndependence in interface IndependenceTest
      Returns:
      This result.
      See Also:
    • getPValue

      public double getPValue()
      Returns The probability associated with the most recently executed independence test, of Double.NaN if p value is not meaningful for this test.
      Returns:
      This p-value.
    • getVariables

      public List<Node> getVariables()
      Returns the list of searchVariables over which this independence checker is capable of determinining independence relations.
      Specified by:
      getVariables in interface IndependenceTest
      Returns:
      This list.
    • determines

      public boolean determines(List<Node> z, Node y)
      Description copied from interface: IndependenceTest
      Returns true if y is determined the variable in z.
      Specified by:
      determines in interface IndependenceTest
      Returns:
      True if so.
      Throws:
      javax.help.UnsupportedOperationException - Method not implemented.
    • getAlpha

      public double getAlpha()
      Returns the significance level of the independence test.
      Specified by:
      getAlpha in interface IndependenceTest
      Returns:
      This level.
      Throws:
      UnsupportedOperationException - if there is no significance level.
    • setAlpha

      public void setAlpha(double alpha)
      Sets the significance level.
      Specified by:
      setAlpha in interface IndependenceTest
      Parameters:
      alpha - This level.
    • getData

      public DataSet getData()
      Returns the data.
      Specified by:
      getData in interface IndependenceTest
      Returns:
      This data.
      See Also:
    • getScore

      public double getScore()
      Returns alph - p.
      Specified by:
      getScore in interface IndependenceTest
      Returns:
      This score.
    • isVerbose

      public boolean isVerbose()
      Returns true if verbose output is printed.
      Specified by:
      isVerbose in interface IndependenceTest
      Returns:
      True if so.
    • setVerbose

      public void setVerbose(boolean verbose)
      Returns whether verbose output should be printed.
      Specified by:
      setVerbose in interface IndependenceTest
      Parameters:
      verbose - True if so.