Class IndTestMultinomialLogisticRegression
java.lang.Object
edu.cmu.tetrad.search.work_in_progress.IndTestMultinomialLogisticRegression
- All Implemented Interfaces:
IndependenceTest
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.
This logisticRegression makes multiple assumptions: 1. IIA 2. Large sample size (multiple regressions needed on subsets of sample)
- Version:
- $Id: $Id
- Author:
- josephramsey, Augustus Mayo.
-
Constructor Summary
ConstructorsConstructorDescriptionIndTestMultinomialLogisticRegression(DataSet data, double alpha) Constructor for IndTestMultinomialLogisticRegression. -
Method Summary
Modifier and TypeMethodDescriptioncheckIndependence(Node x, Node y, Set<Node> z) Checks for independence between two nodes, given a set of conditioning nodes.booleandetermines(List<Node> z, Node y) Determines if Node y is determined by the given list of Nodes z.doublegetAlpha()Retrieves the significance level of the independence test.getData()Retrieves the original data used for the independence test.doublegetPValue.getVariables.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 for the independence test.voidsetVerbose(boolean verbose) Sets whether this test will print verbose output.toString()Returns a string representation of the object.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.test.IndependenceTest
checkIndependence, determines, getCov, getDataSets, getSampleSize, getVariable, getVariableNames
-
Constructor Details
-
IndTestMultinomialLogisticRegression
Constructor for IndTestMultinomialLogisticRegression.
- Parameters:
data- aDataSetobjectalpha- a double
-
-
Method Details
-
indTestSubset
Performs an independence test for a sublist of variables.- Specified by:
indTestSubsetin interfaceIndependenceTest- Parameters:
vars- The sublist of variables.- Returns:
- An object of type IndependenceTest.
- Throws:
UnsupportedOperationException- if the independence subset feature is not implemented.
-
checkIndependence
Checks for independence between two nodes, given a set of conditioning nodes.- Specified by:
checkIndependencein interfaceIndependenceTest- Parameters:
x- The first node.y- The second node.z- The set of conditioning nodes.- Returns:
- An object of type IndependenceResult indicating the independence relationship between x and y, given z.
-
getPValue
public double getPValue()getPValue.
- Returns:
- the probability associated with the most recently executed independence test, of Double.NaN if p value is not meaningful for tis test.
-
getVariables
getVariables.
- Specified by:
getVariablesin interfaceIndependenceTest- Returns:
- the list of searchVariables over which this independence checker is capable of determinining independence relations.
-
determines
Determines if Node y is determined by the given list of Nodes z.- Parameters:
z- The list of Nodes to condition on.y- The Node to be determined.- Returns:
- True if y is determined by z, false otherwise.
-
getAlpha
public double getAlpha()Retrieves the significance level of the independence test.- Specified by:
getAlphain interfaceIndependenceTest- Returns:
- The significance level.
-
setAlpha
public void setAlpha(double alpha) Sets the significance level for the independence test.- Specified by:
setAlphain interfaceIndependenceTest- Parameters:
alpha- The significance level.
-
getData
Retrieves the original data used for the independence test.- Specified by:
getDatain interfaceIndependenceTest- Returns:
- The original DataSet object used for the independence test.
-
toString
Returns a string representation of the object.- Specified by:
toStringin interfaceIndependenceTest- Overrides:
toStringin classObject- Returns:
- a string representation of the object.
-
isVerbose
public boolean isVerbose()Returns true if the test prints verbose output.- Specified by:
isVerbosein interfaceIndependenceTest- Returns:
- True if the case.
-
setVerbose
public void setVerbose(boolean verbose) Sets whether this test will print verbose output.- Specified by:
setVerbosein interfaceIndependenceTest- Parameters:
verbose- True, if so.
-