Package edu.cmu.tetrad.search.test
Class IndTestRegression
java.lang.Object
edu.cmu.tetrad.search.test.IndTestRegression
- All Implemented Interfaces:
- IndependenceTest
Checks independence of X _||_ Y | Z for variables X and Y and list Z of variables by regressing X on {Y} U Z and
 testing whether the coefficient for Y is zero.
- Version:
- $Id: $Id
- Author:
- josephramsey, Frank Wimberly
- 
Constructor SummaryConstructorsConstructorDescriptionIndTestRegression(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 xVar, Node yVar, Set<Node> zList) Checks the independence between two variables, given a set of conditioning variables.booleandetermines(List<Node> zList, Node xVar) Determines if a variable xVar can be determined by a list of conditioning variables zList.doublegetAlpha()Gets the getModel significance level.getData()Returns the data used.Returns the list of variables associated with this object.indTestSubset(List<Node> vars) Performs an independence test for a sublist of variables.booleanReturns true if the test prints verbose output.voidsetAlpha(double alpha) Sets the significance level.voidsetVerbose(boolean verbose) Sets whether this test will print verbose output.toString()Returns a string representation of the Linear Regression Test object.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.IndependenceTestcheckIndependence, determines, getCov, getDataSets, getSampleSize, getVariable, getVariableNames
- 
Constructor Details- 
IndTestRegressionConstructs 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 for a sublist of variables.- Specified by:
- indTestSubsetin interface- IndependenceTest
- Parameters:
- vars- The sublist of variables.
- Returns:
- The independence test result.
 
- 
checkIndependenceChecks the independence between two variables, given a set of conditioning variables.- Specified by:
- checkIndependencein interface- IndependenceTest
- Parameters:
- xVar- The first variable to test for independence.
- yVar- The second variable to test for independence.
- zList- The set of conditioning variables.
- Returns:
- An IndependenceResult object containing the result of the independence test.
 
- 
getAlphapublic double getAlpha()Gets the getModel significance level.- Specified by:
- getAlphain interface- IndependenceTest
- Returns:
- a double
 
- 
setAlphapublic void setAlpha(double alpha) Sets the significance level.- Specified by:
- setAlphain interface- IndependenceTest
- Parameters:
- alpha- This level.
- Throws:
- IllegalArgumentException- if alpha is not within the range [0, 1].
 
- 
getVariablesReturns the list of variables associated with this object.- Specified by:
- getVariablesin interface- IndependenceTest
- Returns:
- the list of variables
 
- 
toStringReturns a string representation of the Linear Regression Test object.- Specified by:
- toStringin interface- IndependenceTest
- Overrides:
- toStringin class- Object
- Returns:
- the string representation of the Linear Regression Test object
 
- 
determinesDetermines if a variable xVar can be determined by a list of conditioning variables zList.- Parameters:
- zList- The list of conditioning variables.
- xVar- The variable to test for determination.
- Returns:
- True if xVar is determined by zList, false otherwise.
- Throws:
- NullPointerException- if zList or any of its elements is null.
 
- 
getDataReturns the data used.- Specified by:
- getDatain interface- IndependenceTest
- Returns:
- the data used.
 
- 
isVerbosepublic boolean isVerbose()Returns true if the test prints verbose output.- Specified by:
- isVerbosein interface- IndependenceTest
- Returns:
- a boolean
 
- 
setVerbosepublic void setVerbose(boolean verbose) Sets whether this test will print verbose output.- Specified by:
- setVerbosein interface- IndependenceTest
- Parameters:
- verbose- True, if verbose output should be printed.
 
 
-