Class LogisticRegression.Result

java.lang.Object
edu.cmu.tetrad.regression.LogisticRegression.Result
All Implemented Interfaces:
TetradSerializable, Serializable
Enclosing class:
LogisticRegression

public static class LogisticRegression.Result extends Object implements TetradSerializable
The result of a logistic regression.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    The array of regression coefficients.
    double
    The intercept.
    double
    The log likelihood of the regression
    int
    The number of regressors.
    int
    The number of data points with target = 0.
    int
    The number of data points with target = 1.
    double[]
    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.
    Generates a simple exemplar of this class to test serialization.
    Returns a string representation of the regression results.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 variable
      regressorNames - the names of the regressors
      xMeans - the array of means
      xStdDevs - the array of standard devs
      numRegressors - the number of regressors
      ny0 - 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 regression
      intercept - the intercept
      logLikelihood - the log likelihood of the regression
      chiSq - the chi square statistic
      alpha - the alpha level
  • Method Details

    • serializableInstance

      public static LogisticRegression.Result serializableInstance()
      Generates a simple exemplar of this class to test serialization.
      Returns:
      a LogisticRegression.Result object
    • getRegressorNames

      public List<String> getRegressorNames()
      The variables.
      Returns:
      a List object
    • getTarget

      public String getTarget()
      The target.
      Returns:
      a String object
    • 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

      public String toString()
      Returns a string representation of the regression results.
      Overrides:
      toString in class Object