Class IndTestPositiveCorr
java.lang.Object
edu.cmu.tetrad.search.work_in_progress.IndTestPositiveCorr
- 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.
- Version:
- $Id: $Id
- Author:
- josephramsey, Frank Wimberly adapted IndTestCramerT for Fisher's Z
- 
Constructor SummaryConstructorsConstructorDescriptionIndTestPositiveCorr(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).
- 
Method SummaryModifier and TypeMethodDescriptioncheckIndependence(Node x0, Node y0, Set<Node> _z0) Checks the independence between two nodes, given a set of conditioning nodes.booleandetermines(List<Node> z, Node x) Determines if there exists a causal relationship between the nodes in z and node x.doublegetAlpha()Retrieves the alpha level of the Independence Test.getCov()getCov.getData()Retrieve the data set used in the independence test.Retrieves the data sets used in the independence test.doubleCalculates the p-value for the independence test.intRetrieves the sample size of the covariance matrix.getVariable(String name) Retrieves the node associated with the given variable name.Retrieves the list of variables used in the independence test.indTestSubset(List<Node> vars) Performs an independence test on a subset of variables.booleanReturns whether the verbose mode is enabled.voidsetAlpha(double alpha) Set the alpha level for the significance of the test.voidsetVariables(List<Node> variables) Sets the variables used in the independence test.voidsetVerbose(boolean verbose) Sets the verbose mode to either enabled or disabled.toString()Returns a string representation of the Fisher Z object.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.IndependenceTestcheckIndependence, determines, getVariableNames
- 
Constructor Details- 
IndTestPositiveCorrConstructs 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.
 
 
- 
- 
Method Details- 
indTestSubsetPerforms an independence test on a subset of variables.- Specified by:
- indTestSubsetin interface- IndependenceTest
- Parameters:
- vars- The sublist of variables.
- Returns:
- An IndependenceTest object representing the result of the test.
- Throws:
- UnsupportedOperationException- This method is not implemented and will always throw an UnsupportedOperationException.
 
- 
checkIndependenceChecks the independence between two nodes, given a set of conditioning nodes.- Specified by:
- checkIndependencein interface- IndependenceTest
- Parameters:
- x0- First node to check independence for.
- y0- Second node to check independence for.
- _z0- Set of conditioning nodes.
- Returns:
- An IndependenceResult object representing the result of the independence test.
 
- 
getPValuepublic double getPValue()Calculates the p-value for the independence test.- Returns:
- The p-value of the independence test.
 
- 
getAlphapublic double getAlpha()Retrieves the alpha level of the Independence Test.- Specified by:
- getAlphain interface- IndependenceTest
- Returns:
- The alpha level.
 
- 
setAlphapublic void setAlpha(double alpha) Set the alpha level for the significance of the test.- Specified by:
- setAlphain interface- IndependenceTest
- Parameters:
- alpha- The alpha level for the significance of the test. Must be a value between 0.0 and 1.0, inclusive.
- Throws:
- IllegalArgumentException- if the alpha value is out of range.
 
- 
getVariablesRetrieves the list of variables used in the independence test.- Specified by:
- getVariablesin interface- IndependenceTest
- Returns:
- The list of variables used in the independence test.
 
- 
setVariablesSets the variables used in the independence test.- Parameters:
- variables- A list of Nodes representing the variables to be used in the test.
- Throws:
- IllegalArgumentException- if the number of variables is different from the current number of variables in the test.
 
- 
getVariableRetrieves the node associated with the given variable name.- Specified by:
- getVariablein interface- IndependenceTest
- Parameters:
- name- a- Stringobject representing the variable name.
- Returns:
- the node associated with the variable name.
 
- 
determinesDetermines if there exists a causal relationship between the nodes in z and node x.- Parameters:
- z- The list of nodes representing the potential causes.
- x- The node representing the potential effect.
- Returns:
- true if there exists a causal relationship between the nodes in z and node x, false otherwise.
- Throws:
- UnsupportedOperationException- if the method is not implemented.
 
- 
getDataRetrieve the data set used in the independence test.- Specified by:
- getDatain interface- IndependenceTest
- Returns:
- The data set.
 
- 
toStringReturns a string representation of the Fisher Z object.- Specified by:
- toStringin interface- IndependenceTest
- Overrides:
- toStringin class- Object
- Returns:
- A string representation of the Fisher Z object.
 
- 
getCovgetCov. - Specified by:
- getCovin interface- IndependenceTest
- Returns:
- a ICovarianceMatrixobject
 
- 
getDataSetsRetrieves the data sets used in the independence test.- Specified by:
- getDataSetsin interface- IndependenceTest
- Returns:
- A list of data sets.
 
- 
getSampleSizepublic int getSampleSize()Retrieves the sample size of the covariance matrix.- Specified by:
- getSampleSizein interface- IndependenceTest
- Returns:
- The sample size.
 
- 
isVerbosepublic boolean isVerbose()Returns whether the verbose mode is enabled.- Specified by:
- isVerbosein interface- IndependenceTest
- Returns:
- true if verbose mode is enabled, false otherwise.
 
- 
setVerbosepublic void setVerbose(boolean verbose) Sets the verbose mode to either enabled or disabled.- Specified by:
- setVerbosein interface- IndependenceTest
- Parameters:
- verbose- True if verbose mode is enabled, false otherwise.
 
 
-