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.boolean
determines
(List<Node> z, Node y) Determines if Node y is determined by the given list of Nodes z.double
getAlpha()
Retrieves the significance level of the independence test.getData()
Retrieves the original data used for the independence test.double
getPValue.getVariables.indTestSubset
(List<Node> vars) Performs an independence test for a sublist of variables.boolean
Returns true if the test prints verbose output.void
setAlpha
(double alpha) Sets the significance level for the independence test.void
setVerbose
(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, wait
Methods inherited from interface edu.cmu.tetrad.search.IndependenceTest
checkIndependence, determines, getCov, getDataSets, getSampleSize, getVariable, getVariableNames
-
Constructor Details
-
IndTestMultinomialLogisticRegression
-
-
Method Details
-
indTestSubset
Performs an independence test for a sublist of variables.- Specified by:
indTestSubset
in 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:
checkIndependence
in 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.
- See Also:
-
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:
getVariables
in interfaceIndependenceTest
- Returns:
- the list of searchVariables over which this independence checker is capable of determinining independence relations.
-
determines
-
getAlpha
public double getAlpha()Retrieves the significance level of the independence test.- Specified by:
getAlpha
in interfaceIndependenceTest
- Returns:
- The significance level.
-
setAlpha
public void setAlpha(double alpha) Sets the significance level for the independence test.- Specified by:
setAlpha
in interfaceIndependenceTest
- Parameters:
alpha
- The significance level.
-
getData
Retrieves the original data used for the independence test.- Specified by:
getData
in interfaceIndependenceTest
- Returns:
- The original DataSet object used for the independence test.
- See Also:
-
toString
Returns a string representation of the object.- Specified by:
toString
in interfaceIndependenceTest
- Overrides:
toString
in classObject
- Returns:
- a string representation of the object.
-
isVerbose
public boolean isVerbose()Returns true if the test prints verbose output.- Specified by:
isVerbose
in interfaceIndependenceTest
- Returns:
- True if the case.
-
setVerbose
public void setVerbose(boolean verbose) Sets whether this test will print verbose output.- Specified by:
setVerbose
in interfaceIndependenceTest
- Parameters:
verbose
- True, if so.
-