Package edu.cmu.tetrad.regression
Class LogisticRegression.Result
java.lang.Object
edu.cmu.tetrad.regression.LogisticRegression.Result
- All Implemented Interfaces:
TetradSerializable
,Serializable
- Enclosing class:
LogisticRegression
The result of a logistic regression.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
getCoefs()
The array of regression coefficients.double
The intercept.double
The log likelihood of the regressionint
The number of regressors.int
getNy0()
The number of data points with target = 0.int
getNy1()
The number of data points with target = 1.double[]
getProbs()
The array of coefP-values for the regression coefficients.The variables.double[]
The array of standard errors for the regression coefficients.The target.double[]
THe array of means.double[]
The array of standard devs.static LogisticRegression.Result
Generates a simple exemplar of this class to test serialization.toString()
Returns a string representation of the regression results.
-
Constructor Details
-
Result
public Result(String target, List<String> regressorNames, double[] xMeans, double[] xStdDevs, int numRegressors, int ny0, int ny1, double[] coefs, double[] stdErrs, double[] probs, double intercept, double logLikelihood, double chiSq, double alpha) Constructs a new LinRegrResult.- Parameters:
target
- the target variableregressorNames
- the names of the regressorsxMeans
- the array of meansxStdDevs
- the array of standard devsnumRegressors
- the number of regressorsny0
- the number of cases with target = 0.ny1
- the number of cases with target = 1.coefs
- the array of regression coefficients.stdErrs
- the array of std errors of the coefficients.probs
- the array of P-values for the regressionintercept
- the interceptlogLikelihood
- the log likelihood of the regressionchiSq
- the chi square statisticalpha
- the alpha level
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization.- Returns:
- a
LogisticRegression.Result
object
-
getRegressorNames
-
getTarget
-
getNy0
public int getNy0()The number of data points with target = 0.- Returns:
- a int
-
getNy1
public int getNy1()The number of data points with target = 1.- Returns:
- a int
-
getNumRegressors
public int getNumRegressors()The number of regressors.- Returns:
- a int
-
getCoefs
public double[] getCoefs()The array of regression coefficients.- Returns:
- an array of double
-
getStdErrs
public double[] getStdErrs()The array of standard errors for the regression coefficients.- Returns:
- an array of double
-
getProbs
public double[] getProbs()The array of coefP-values for the regression coefficients.- Returns:
- an array of double
-
getxMeans
public double[] getxMeans()THe array of means.- Returns:
- an array of double
-
getxStdDevs
public double[] getxStdDevs()The array of standard devs.- Returns:
- an array of double
-
getIntercept
public double getIntercept()The intercept.- Returns:
- a double
-
getLogLikelihood
public double getLogLikelihood()The log likelihood of the regression- Returns:
- a double
-
toString
-