Class RegressionCovariance

java.lang.Object
edu.cmu.tetrad.regression.RegressionCovariance
All Implemented Interfaces:
Regression

public class RegressionCovariance extends Object implements Regression
Implements a regression model from correlations--that is, from a correlation matrix, a list of standard deviations, and a list of means.
Author:
josephramsey
  • Constructor Details

    • RegressionCovariance

      public RegressionCovariance(ICovarianceMatrix covariances)
      Constructs a covariance-based regression model using the given covariance matrix, assuming that no means are specified.
      Parameters:
      covariances - The covariance matrix.
  • Method Details

    • setAlpha

      public void setAlpha(double alpha)
      Sets the cutoff for significance. Parameters with p values less than this will be labeled as significant.
      Specified by:
      setAlpha in interface Regression
      Parameters:
      alpha - The significance level.
    • getGraph

      public Graph getGraph()
      Specified by:
      getGraph in interface Regression
      Returns:
      This graph.
    • regress

      public RegressionResult regress(Node target, List<Node> regressors)
      Regresses the given target on the given regressors, yielding a regression plane, in which coefficients are given for each regressor plus the constant (if means have been specified, that is, for the last), and se, t, and p values are given for each regressor.
      Specified by:
      regress in interface Regression
      Parameters:
      target - The variable being regressed.
      regressors - The list of regressors.
      Returns:
      the regression plane.
    • regress

      public RegressionResult regress(Node target, Node... regressors)
      Description copied from interface: Regression
      Regresses target on the regressors, yielding a regression plane.
      Specified by:
      regress in interface Regression
      Parameters:
      target - the target variable, being regressed.
      regressors - the list of variables being regressed on.
      Returns:
      the regression plane.