| Modifier and Type | Field and Description |
|---|---|
| private static final int | ADJRSQ_IDX
INDEX of Adjusted R Squared |
| private final boolean | containsConstant
boolean flag indicator of whether a constant was included |
| private final double[] | globalFitInfo
array storing global results, SSE, MSE, RSQ, adjRSQ |
| private final boolean | isSymmetricVCD
boolean flag for variance covariance matrix in symm compressed storage |
| private static final int | MSE_IDX
INDEX of Mean Squared Error |
| private final long | nobs
number of observations on which results are based |
| private final double[] | parameters
regression slope parameters |
| private final int | rank
rank of the solution |
| private static final int | RSQ_IDX
INDEX of R-Squared of regression |
| private static final long | |
| private static final int | SSE_IDX
INDEX of Sum of Squared Errors |
| private static final int | SST_IDX
INDEX of Sum of Squares of Model |
| private final double[][] | varCovData
variance covariance matrix of parameters |
| Access | Constructor and Description |
|---|---|
| private | RegressionResults()
Set the default constructor to private access to prevent inadvertent instantiation |
| public | RegressionResults(final double[]
a double array with the regression slope estimates parameters, final double[][] the variance covariance matrix, stored either in a square matrix
or as a compressed varcov, final boolean a flag which denotes that the variance covariance
matrix is in symmetric compressed format isSymmetricCompressed, final long the number of observations of the regression estimation nobs, final int the number of independent variables in the regression rank, final double the sum of the independent variable sumy, final double the sum of the squared independent variable sumysq, final double sum of squared errors sse, final boolean true model has constant, false model does not have constant containsConstant, final boolean if true a deep copy of all input data is made, if false only references
are copied and the RegressionResults become mutable copyData)Constructor for Regression Results. |
| Modifier and Type | Method and Description |
|---|---|
| public double | Returns: adjusted R-Squared statisticReturns the adjusted R-squared statistic, defined by the formula R2adj = 1 - [SSR (n - 1)] / [SSTO (n - p)] |
| public double | Returns: the covariance of the parameter estimates.ith regression parameter.jth regression parameter.Returns the covariance between regression parameters i and j. |
| public double | Returns: sum of squared errors associated with the regression modelReturns the sum of squared errors (SSE) associated with the regression model. |
| public double | Returns: sum of squared deviations of y valuesReturns the sum of squared errors divided by the degrees of freedom, usually abbreviated MSE. |
| public long | Returns: Number of observations, -1 if an error condition prevents estimationReturns the number of observations added to the regression model. |
| public int | Returns: number of regressors, -1 if not estimatedReturns the number of parameters estimated in the model. |
| public double | Returns: the parameters estimated for regressor at index.Index. index)Returns the parameter estimate for the regressor at the given index. |
| public double[] | Returns: array of parameter estimates, null if no estimation occurredReturns a copy of the regression parameters estimates. |
| public double | Returns: sum of squared deviations of predicted y valuesReturns the sum of squared deviations of the predicted y values about their mean (which equals the mean of y). |
| public double | Returns: r-square, a double in the interval [0, 1]Returns the coefficient of multiple determination, usually denoted r-square. |
| public double | Returns: the standard errors associated with parameters estimated at index.Index. index)Returns the standard error of the parameter estimate at index, usually denoted s(bindex). |
| public double[] | Returns: an array standard errors associated with parameters estimates, null if no estimation occurredReturns the standard error of the parameter estimates, usually denoted s(bi). |
| public double | Returns: sum of squared deviations of y valuesReturns the sum of squared deviations of the y values about their mean. |
| private double | Returns: the requested variance-covariance matrix entryfirst variable index i, int second variable index j)Gets the i-jth element of the variance-covariance matrix. |
| public boolean | Returns: true if the model has an intercept termReturns true if the regression model has been computed including an intercept. |
| ADJRSQ_IDX | back to summary |
|---|---|
| private static final int ADJRSQ_IDX INDEX of Adjusted R Squared | |
| containsConstant | back to summary |
|---|---|
| private final boolean containsConstant boolean flag indicator of whether a constant was included | |
| globalFitInfo | back to summary |
|---|---|
| private final double[] globalFitInfo array storing global results, SSE, MSE, RSQ, adjRSQ | |
| isSymmetricVCD | back to summary |
|---|---|
| private final boolean isSymmetricVCD boolean flag for variance covariance matrix in symm compressed storage | |
| MSE_IDX | back to summary |
|---|---|
| private static final int MSE_IDX INDEX of Mean Squared Error | |
| nobs | back to summary |
|---|---|
| private final long nobs number of observations on which results are based | |
| parameters | back to summary |
|---|---|
| private final double[] parameters regression slope parameters | |
| rank | back to summary |
|---|---|
| private final int rank rank of the solution
| |
| RSQ_IDX | back to summary |
|---|---|
| private static final int RSQ_IDX INDEX of R-Squared of regression | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID UID | |
| SSE_IDX | back to summary |
|---|---|
| private static final int SSE_IDX INDEX of Sum of Squared Errors | |
| SST_IDX | back to summary |
|---|---|
| private static final int SST_IDX INDEX of Sum of Squares of Model | |
| varCovData | back to summary |
|---|---|
| private final double[][] varCovData variance covariance matrix of parameters | |
| RegressionResults | back to summary |
|---|---|
| private RegressionResults() Set the default constructor to private access to prevent inadvertent instantiation
| |
| RegressionResults | back to summary |
|---|---|
| public RegressionResults(final double[] parameters, final double[][] varcov, final boolean isSymmetricCompressed, final long nobs, final int rank, final double sumy, final double sumysq, final double sse, final boolean containsConstant, final boolean copyData) Constructor for Regression Results.
| |
| getAdjustedRSquared | back to summary |
|---|---|
| public double getAdjustedRSquared() Returns the adjusted R-squared statistic, defined by the formula R2adj = 1 - [SSR (n - 1)] / [SSTO (n - p)]where SSR is the sum of squared residuals}, SSTO is the total sum of squares}, n is the number of observations and p is the number of parameters estimated (including the intercept). If the regression is estimated without an intercept term, what is returned is
| |
| getCovarianceOfParameters | back to summary |
|---|---|
| public double getCovarianceOfParameters(int i, int j) throws OutOfRangeException Returns the covariance between regression parameters i and j. If there are problems with an ill conditioned design matrix then the covariance
which involves redundant columns will be assigned
| |
| getErrorSumSquares | back to summary |
|---|---|
| public double getErrorSumSquares() Returns the sum of squared errors (SSE) associated with the regression model. The return value is constrained to be non-negative - i.e., if due to rounding errors the computational formula returns a negative result, 0 is returned. Preconditions:
| |
| getMeanSquareError | back to summary |
|---|---|
| public double getMeanSquareError() Returns the sum of squared errors divided by the degrees of freedom, usually abbreviated MSE. If there are fewer than numberOfParameters + 1 data pairs in the model,
or if there is no variation in
| |
| getN | back to summary |
|---|---|
| public long getN() Returns the number of observations added to the regression model.
| |
| getNumberOfParameters | back to summary |
|---|---|
| public int getNumberOfParameters() Returns the number of parameters estimated in the model. This is the maximum number of regressors, some techniques may drop redundant parameters
| |
| getParameterEstimate | back to summary |
|---|---|
| public double getParameterEstimate(int index) throws OutOfRangeException Returns the parameter estimate for the regressor at the given index. A redundant regressor will have its redundancy flag set, as well as
a parameters estimated equal to
| |
| getParameterEstimates | back to summary |
|---|---|
| public double[] getParameterEstimates() Returns a copy of the regression parameters estimates. The parameter estimates are returned in the natural order of the data. A redundant regressor will have its redundancy flag set, as will
a parameter estimate equal to
| |
| getRegressionSumSquares | back to summary |
|---|---|
| public double getRegressionSumSquares() Returns the sum of squared deviations of the predicted y values about their mean (which equals the mean of y). This is usually abbreviated SSR or SSM. It is defined as SSM here Preconditions:
| |
| getRSquared | back to summary |
|---|---|
| public double getRSquared() Returns the coefficient of multiple determination, usually denoted r-square. Preconditions:
| |
| getStdErrorOfEstimate | back to summary |
|---|---|
| public double getStdErrorOfEstimate(int index) throws OutOfRangeException Returns the standard error of the parameter estimate at index, usually denoted s(bindex).
| |
| getStdErrorOfEstimates | back to summary |
|---|---|
| public double[] getStdErrorOfEstimates() Returns the standard error of the parameter estimates, usually denoted s(bi). If there are problems with an ill conditioned design matrix then the regressor
which is redundant will be assigned
| |
| getTotalSumSquares | back to summary |
|---|---|
| public double getTotalSumSquares() Returns the sum of squared deviations of the y values about their mean. This is defined as SSTO here. If
| |
| getVcvElement | back to summary |
|---|---|
| private double getVcvElement(int i, int j) Gets the i-jth element of the variance-covariance matrix.
| |
| hasIntercept | back to summary |
|---|---|
| public boolean hasIntercept() Returns true if the regression model has been computed including an intercept.
In this case, the coefficient of the intercept is the first element of the
| |