Package edu.cmu.tetrad.regression
Class RegressionResult
java.lang.Object
edu.cmu.tetrad.regression.RegressionResult
- All Implemented Interfaces:
- TetradSerializable,- Serializable
Stores the various components of a regression result so they can be passed
 around together more easily.
- Author:
- Joseph Ramsey
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionRegressionResult(boolean zeroInterceptAssumed, String[] regressorNames, int n, double[] b, double[] t, double[] p, double[] se, double r2, double rss, double alpha, Vector res) A result for a variety of regression algorithm.
- 
Method SummaryModifier and TypeMethodDescriptiondouble[]getCoef()intgetN()intdouble[]getP()doublegetPredictedValue(double[] x) String[]double[]getSe()double[]getT()static RegressionResultGenerates a simple exemplar of this class to test serialization.toString()
- 
Constructor Details- 
RegressionResultpublic RegressionResult(boolean zeroInterceptAssumed, String[] regressorNames, int n, double[] b, double[] t, double[] p, double[] se, double r2, double rss, double alpha, Vector res) A result for a variety of regression algorithm.- Parameters:
- zeroInterceptAssumed- True iff a zero intercept was assumed in doing the regression, in which case this coefficient is provided; otherwise, not.
- regressorNames- The list of regressor variable names, in order.
- n- The sample size.
- b- The list of coefficients, in order. If a zero intercept was not assumed, this list begins with the intercept.
- t- The list of t-statistics for the coefficients, in order. If a zero intercept was not assumed, this list begins with the t statistic for the intercept.
- p- The p-values for the coefficients, in order. If a zero intercept was not assumed, this list begins with the p value for the intercept.
- se- The standard errors for the coefficients, in order. If a zero intercept was not assumed, this list begins with the standard error of the intercept.
- r2- The R squared statistic for the regression.
- rss- The residual sum of squares of the regression.
- alpha- The alpha value for the regression, determining which regressors are taken to be
 
 
- 
- 
Method Details- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.
- 
getNpublic int getN()- Returns:
- the number of data points.
 
- 
getNumRegressorspublic int getNumRegressors()- Returns:
- the number of regressors.
 
- 
getCoefpublic double[] getCoef()- Returns:
- the array of regression coeffients.
 
- 
getTpublic double[] getT()- Returns:
- the array of t-statistics for the regression coefficients.
 
- 
getPpublic double[] getP()- Returns:
- the array of p-values for the regression coefficients.
 
- 
getSepublic double[] getSe()
- 
getRegressorNames
- 
getPredictedValuepublic double getPredictedValue(double[] x) 
- 
toString
- 
getResultsTable
- 
getPreamble
- 
getResiduals
 
-