Package edu.cmu.tetrad.search.test
Class IndTestConditionalGaussianLrt
java.lang.Object
edu.cmu.tetrad.search.test.IndTestConditionalGaussianLrt
- All Implemented Interfaces:
- IndependenceTest,- RowsSettable
Performs a test of conditional independence X _||_ Y | Z1...Zn where all searchVariables are either continuous or
 discrete. This test is valid for both ordinal and non-ordinal discrete searchVariables.
 
Assumes a conditional Gaussian model and uses a likelihood ratio test.
- Version:
- $Id: $Id
- Author:
- josephramsey
- 
Constructor SummaryConstructorsConstructorDescriptionIndTestConditionalGaussianLrt(DataSet data, double alpha, boolean discretize) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptioncheckIndependence(Node x, Node y, Set<Node> _z) Returns and independence result that states whether x _||_y | z and what the p-value of the test is.booleandetermines(List<Node> z, Node y) Determines whether a given list of nodes (z) determines a node (y).doublegetAlpha()Returns the significance level of the independence test.getData()Returns the data.doubleReturns the probability associated with the most recently executed independence test, of Double.NaN if p value is not meaningful for this test.getRows()Returns the rows used in the test.Returns the list of variables over which this independence checker is capable of determining independence relations.indTestSubset(List<Node> vars) This method returns an instance of the IndependenceTest interface that can test the independence of a subset of variables.booleanReturns true iff verbose output should be printed.voidsetAlpha(double alpha) Sets the significance level.voidsetMinSampleSizePerCell(int minSampleSizePerCell) Sets the minimum sample size per cell for the independence test.voidsetNumCategoriesToDiscretize(int numCategoriesToDiscretize) Sets the number of categories used to discretize variables.voidAllows the user to set which rows are used in the test.voidsetVerbose(boolean verbose) Sets whether verbose output should be printed.toString()Returns a string representation of this test.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- 
IndTestConditionalGaussianLrtConstructor.- Parameters:
- data- The data to analyze.
- alpha- The significance level.
- discretize- Whether discrete children of continuous parents should be discretized.
 
 
- 
- 
Method Details- 
indTestSubsetThis method returns an instance of the IndependenceTest interface that can test the independence of a subset of variables.- Specified by:
- indTestSubsetin interface- IndependenceTest
- Parameters:
- vars- The sublist of variables to test for independence.
- Returns:
- An instance of the IndependenceTest interface.
- See Also:
 
- 
checkIndependenceReturns and independence result that states whether x _||_y | z and what the p-value of the test is.- Specified by:
- checkIndependencein interface- IndependenceTest
- Parameters:
- x- a- Nodeobject
- y- a- Nodeobject
- _z- a- Setobject
- Returns:
- a IndependenceResultobject
- See Also:
 
- 
getPValuepublic 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.
 
- 
getVariablesReturns the list of variables over which this independence checker is capable of determining independence relations.- Specified by:
- getVariablesin interface- IndependenceTest
- Returns:
- This list.
 
- 
determinesDetermines whether a given list of nodes (z) determines a node (y).- Parameters:
- z- The list of nodes to check if they determine y.
- y- The node to check if it is determined by z.
- Returns:
- True if z determines y, false otherwise.
- Throws:
- UnsupportedOperationException- if not implemented.
 
- 
getAlphapublic double getAlpha()Returns the significance level of the independence test.- Specified by:
- getAlphain interface- IndependenceTest
- Returns:
- This level.
 
- 
setAlphapublic void setAlpha(double alpha) Sets the significance level.- Specified by:
- setAlphain interface- IndependenceTest
- Parameters:
- alpha- This level.
 
- 
getDataReturns the data.- Specified by:
- getDatain interface- IndependenceTest
- Returns:
- This data.
 
- 
toStringReturns a string representation of this test.- Specified by:
- toStringin interface- IndependenceTest
- Overrides:
- toStringin class- Object
- Returns:
- This string.
 
- 
isVerbosepublic boolean isVerbose()Returns true iff verbose output should be printed.- Specified by:
- isVerbosein interface- IndependenceTest
- Returns:
- True if the case.
 
- 
setVerbosepublic void setVerbose(boolean verbose) Sets whether verbose output should be printed.- Specified by:
- setVerbosein interface- IndependenceTest
- Parameters:
- verbose- True, if so.
 
- 
setNumCategoriesToDiscretizepublic void setNumCategoriesToDiscretize(int numCategoriesToDiscretize) Sets the number of categories used to discretize variables.- Parameters:
- numCategoriesToDiscretize- This number, by default 3.
 
- 
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 for the test. Can be null.
 
- 
setMinSampleSizePerCellpublic void setMinSampleSizePerCell(int minSampleSizePerCell) Sets the minimum sample size per cell for the independence test.- Parameters:
- minSampleSizePerCell- The minimum sample size per cell.
 
 
-