Package edu.cmu.tetrad.search
Class IndTestFisherZ
java.lang.Object
edu.cmu.tetrad.search.IndTestFisherZ
- All Implemented Interfaces:
- IndependenceTest
Checks conditional independence of variable in a continuous data set using Fisher's Z test. See Spirtes, Glymour, and
 Scheines, "Causation, Prediction and Search," 2nd edition, page 94.
- Author:
- Joseph Ramsey, Frank Wimberly adapted IndTestCramerT for Fisher's Z
- 
Constructor SummaryConstructorsConstructorDescriptionIndTestFisherZ(DataSet dataSet, double alpha) Constructs a new Independence test which checks independence facts based on the correlation matrix implied by the given data set (must be continuous).IndTestFisherZ(ICovarianceMatrix covMatrix, double alpha) Constructs a new independence test that will determine conditional independence facts using the given correlation matrix and the given significance level.IndTestFisherZ(Matrix data, List<Node> variables, double alpha) Constructs a new Fisher Z independence test with the listed arguments.
- 
Method SummaryModifier and TypeMethodDescriptioncheckIndependence(Node x, Node y, List<Node> z) Determines whether variable x is independent of variable y given a list of conditioning variables z.booleandetermines(List<Node> z, Node x) IfisDeterminismAllowed(), deters to IndTestFisherZD; otherwise throws UnsupportedOperationException.doublegetAlpha()Gets the getModel significance level.doublegetBic()getCov()getData()doubledoubleintdoublegetScore()A score that is higher with more likely models.getVariable(String name) indTestSubset(List<Node> vars) Creates a new independence test instance for a subset of the variables.booleanvoidsetAlpha(double alpha) Sets the significance level at which independence judgments should be made.voidsetVariables(List<Node> variables) voidsetVerbose(boolean verbose) toString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.IndependenceTestcheckIndependence
- 
Constructor Details- 
IndTestFisherZConstructs a new Independence test which checks independence facts based on the correlation matrix implied by the given data set (must be continuous). The given significance level is used.- Parameters:
- dataSet- A data set containing only continuous columns.
- alpha- The alpha level of the test.
 
- 
IndTestFisherZConstructs a new Fisher Z independence test with the listed arguments.- Parameters:
- data- A 2D continuous data set with no missing values.
- variables- A list of variables, a subset of the variables of- data.
- alpha- The significance cutoff level. p values less than alpha will be reported as dependent.
 
- 
IndTestFisherZConstructs a new independence test that will determine conditional independence facts using the given correlation matrix and the given significance level.
 
- 
- 
Method Details- 
indTestSubsetCreates a new independence test instance for a subset of the variables.- Specified by:
- indTestSubsetin interface- IndependenceTest
- Returns:
- an Independence test for a subset of the variables.
 
- 
checkIndependenceDetermines whether variable x is independent of variable y given a list of conditioning variables z.- Specified by:
- checkIndependencein interface- IndependenceTest
- Parameters:
- x- the one variable being compared.
- y- the second variable being compared.
- z- the list of conditioning variables.
- Returns:
- true iff x _||_ y | z.
- Throws:
- RuntimeException- if a matrix singularity is encountered.
 
- 
getPValuepublic double getPValue()- Returns:
- the probability associated with the most recently computed independence test.
 
- 
getPValuepublic double getPValue(Node x, Node y, List<Node> z) throws org.apache.commons.math3.linear.SingularMatrixException - Throws:
- org.apache.commons.math3.linear.SingularMatrixException
 
- 
getBicpublic double getBic()
- 
getAlphapublic double getAlpha()Gets the getModel significance level.- Specified by:
- getAlphain interface- IndependenceTest
- Returns:
- the significance level of the independence test.
 
- 
setAlphapublic void setAlpha(double alpha) Sets the significance level at which independence judgments should be made. Affects the cutoff for partial correlations to be considered statistically equal to zero.- Specified by:
- setAlphain interface- IndependenceTest
 
- 
getVariables- Specified by:
- getVariablesin interface- IndependenceTest
- Returns:
- the list of variables over which this independence checker is capable of determinine independence relations-- that is, all the variables in the given graph or the given data set.
 
- 
setVariables
- 
getVariable- Specified by:
- getVariablein interface- IndependenceTest
- Returns:
- the variable with the given name.
 
- 
getVariableNames- Specified by:
- getVariableNamesin interface- IndependenceTest
- Returns:
- the list of variable varNames.
 
- 
determinesIfisDeterminismAllowed(), deters to IndTestFisherZD; otherwise throws UnsupportedOperationException.- Specified by:
- determinesin interface- IndependenceTest
- Returns:
- true if y is determined the variable in z.
- Throws:
- UnsupportedOperationException
 
- 
getData- Specified by:
- getDatain interface- IndependenceTest
- Returns:
- the data set being analyzed.
 
- 
toString- Specified by:
- toStringin interface- IndependenceTest
- Overrides:
- toStringin class- Object
- Returns:
- a string representation of this test.
 
- 
getCov- Specified by:
- getCovin interface- IndependenceTest
 
- 
getDataSets- Specified by:
- getDataSetsin interface- IndependenceTest
 
- 
getSampleSizepublic int getSampleSize()- Specified by:
- getSampleSizein interface- IndependenceTest
 
- 
getCovMatrices- Specified by:
- getCovMatricesin interface- IndependenceTest
 
- 
getScorepublic double getScore()Description copied from interface:IndependenceTestA score that is higher with more likely models.- Specified by:
- getScorein interface- IndependenceTest
 
- 
isVerbosepublic boolean isVerbose()- Specified by:
- isVerbosein interface- IndependenceTest
 
- 
setVerbosepublic void setVerbose(boolean verbose) - Specified by:
- setVerbosein interface- IndependenceTest
 
 
-