Package edu.cmu.tetrad.search.test
Class IndTestFisherZ
java.lang.Object
edu.cmu.tetrad.search.test.IndTestFisherZ
- All Implemented Interfaces:
- IndependenceTest,- RowsSettable
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:
- josephramsey, Frank Wimberly
- 
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, Set<Node> z) Determines whether variable x _||_ y | z given a list of conditioning variables z.booleandetermines(List<Node> z, Node x) Returns true in case the variable in Z jointly determine x.doublegetAlpha()Gets the model significance level.doublegetBic()Returns the BIC score for this test.getCov()Returns the correlation matrix being analyzed.getData()Returns the data set being analyzed.Returns the (singleton) list of datasets being analyzed.getRows()Returns the rows used in the test.intReturns the sample size.getVariable(String name) Returns the variable with the given name.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.indTestSubset(List<Node> vars) Creates a new independence test instance for a subset of the variables.booleanReturns true iff verbose output should be printed.voidsetAlpha(double alpha) Sets the significance level at which independence judgments should be made.voidAllows the user to set which rows are used in the test.voidsetUsePseudoinverse(boolean usePseudoinverse) voidsetVariables(List<Node> variables) Sets the variables to a new list of the same size.voidsetVerbose(boolean verbose) Sets whether verbose output should be printed.toString()Returns a string representation of this test.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.IndependenceTestcheckIndependence, determines, getVariableNames
- 
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 alpha level of the test.
 
- 
IndTestFisherZConstructs a new independence test that will determine conditional independence facts using the given correlation matrix and the given significance level.- Parameters:
- covMatrix- The covariance matrix.
- alpha- The alpha level of the test.
 
 
- 
- 
Method Details- 
indTestSubsetCreates a new independence test instance for a subset of the variables.- Specified by:
- indTestSubsetin interface- IndependenceTest
- Parameters:
- vars- The sublist of variables.
- Returns:
- a new independence test.
- See Also:
 
- 
checkIndependenceDetermines whether variable x _||_ y | z given a list of conditioning variables z.- Specified by:
- checkIndependencein interface- IndependenceTest
- Returns:
- Independence result for x _||_ y | z.
- Throws:
- RuntimeException- if a matrix singularity is encountered.
- See Also:
 
- 
getBicpublic double getBic()Returns the BIC score for this test.- Returns:
- The BIC score.
 
- 
getAlphapublic double getAlpha()Gets the model significance level.- Specified by:
- getAlphain interface- IndependenceTest
- Returns:
- This alpha.
 
- 
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
- Parameters:
- alpha- This alpha.
 
- 
getVariablesReturns 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.- Specified by:
- getVariablesin interface- IndependenceTest
- Returns:
- This list.
 
- 
setVariablesSets the variables to a new list of the same size. Useful if multiple independence tests are needed with object-identical sets of variables.- Parameters:
- variables- The new list of variables.
 
- 
getVariableReturns the variable with the given name.- Specified by:
- getVariablein interface- IndependenceTest
- Returns:
- This variable.
 
- 
getDataReturns the data set being analyzed.- Specified by:
- getDatain interface- IndependenceTest
- Returns:
- This data.
- See Also:
 
- 
getCovReturns the correlation matrix being analyzed.- Specified by:
- getCovin interface- IndependenceTest
- Returns:
- This correlation matrix.
 
- 
getDataSetsReturns the (singleton) list of datasets being analyzed.- Specified by:
- getDataSetsin interface- IndependenceTest
- Returns:
- This list (length 1).
 
- 
getSampleSizepublic int getSampleSize()Returns the sample size.- Specified by:
- getSampleSizein interface- IndependenceTest
- Returns:
- This size.
 
- 
isVerbosepublic boolean isVerbose()Returns true iff verbose output should be printed.- Specified by:
- isVerbosein interface- IndependenceTest
- Returns:
- True, if so.
 
- 
setVerbosepublic void setVerbose(boolean verbose) Sets whether verbose output should be printed.- Specified by:
- setVerbosein interface- IndependenceTest
- Parameters:
- verbose- True, if so.
 
- 
toStringDescription copied from interface:IndependenceTestReturns a string representation of this test.- Specified by:
- toStringin interface- IndependenceTest
- Overrides:
- toStringin class- Object
- Returns:
- A string representation of this test.
 
- 
determinesReturns true in case the variable in Z jointly determine x.- Parameters:
- z- The contitioning variables.
- x- The conditioned variable.
- Throws:
- UnsupportedOperationException
 
- 
getRowsReturns the rows used in the test.- Specified by:
- getRowsin interface- RowsSettable
- Returns:
- The rows used in the test.
 
- 
setRowsAllows the user to set which rows are used in the test. Otherwise, all rows are used, except those with missing values.- Specified by:
- setRowsin interface- RowsSettable
- Parameters:
- rows- The rows to use.
 
- 
setUsePseudoinversepublic void setUsePseudoinverse(boolean usePseudoinverse) 
 
-