public class LinearRegression.CaseStatistics extends Object
CaseStatistics
allows for the computation of
predicted values, confidence intervals, and diagnostics for detecting
outliers and cases that greatly influence the fitted regression.Constructor and Description |
---|
CaseStatistics(double[] x,
double y)
Deprecated.
The
CaseStatistics constructors have been deprecated in
favor of getter methods in LinearRegression . |
CaseStatistics(double[] x,
double y,
double w)
Deprecated.
The
CaseStatistics constructors have been deprecated in
favor of getter methods in LinearRegression . |
CaseStatistics(double[] x,
double y,
double w,
int pred)
Deprecated.
The
CaseStatistics constructors have been deprecated in
favor of getter methods in LinearRegression . |
CaseStatistics(double[] x,
double y,
int pred)
Deprecated.
The
CaseStatistics constructors have been deprecated in
favor of getter methods in LinearRegression . |
Modifier and Type | Method and Description |
---|---|
double[] |
getCaseStatistics()
Deprecated.
Recommend using specific getter methods.
|
double[] |
getConfidenceInterval()
Returns the Confidence Interval of the population mean for an
observation.
|
double |
getCooksDistance()
Returns Cook's Distance for an observation.
|
double |
getDFFITS()
Returns DFFITS for an observation.
|
double |
getJackknifeResidual()
Returns the Jackknife Residual for an observation.
|
double |
getLeverage()
Returns the Leverage for an observation.
|
double |
getObservedResponse()
Returns the observed response for an observation.
|
double |
getPredictedResponse()
Returns the predicted response for an observation.
|
double[] |
getPredictionInterval()
Returns the Prediction Interval of the predicted response for an
observation.
|
double |
getResidual()
Returns the Residual for an observation.
|
double |
getStandardizedResidual()
Returns the Standardized Residual for an observation.
|
void |
setConLevelMean(double conpcm)
Sets the confidence level for two-sided confidence intervals of the
population mean.
|
void |
setConLevelPred(double conpcp)
Sets the confidence level for two-sided prediction intervals.
|
public CaseStatistics(double[] x, double y)
CaseStatistics
constructors have been deprecated in
favor of getter methods in LinearRegression
.x
- a double
array containing the independent
(explanatory) variables. Its length must be equal to the number of
variables set in the LinearRegression constructor.y
- a double
representing the dependent (response)
variablepublic CaseStatistics(double[] x, double y, double w)
CaseStatistics
constructors have been deprecated in
favor of getter methods in LinearRegression
.x
- a double
array containing the independent
(explanatory) variables. Its length must be equal to the number of
variables set in the constructor.y
- a double
representing the dependent (response)
variablew
- a double
representing the weightpublic CaseStatistics(double[] x, double y, double w, int pred)
CaseStatistics
constructors have been deprecated in
favor of getter methods in LinearRegression
.x
- a double
array containing the independent
(explanatory) variables. Its length must be equal to the number of
variables set in the constructor.y
- a double
representing the dependent (response)
variablew
- a double
representing the weightpred
- an int
representing the number of future
responses for which the prediction interval is desired on the average
of the future responsespublic CaseStatistics(double[] x, double y, int pred)
CaseStatistics
constructors have been deprecated in
favor of getter methods in LinearRegression
.x
- a double
array containing the independent
(explanatory) variables. Its length must be equal to the number of
variables set in the constructor.y
- a double
representing the dependent (response)
variablepred
- an int
representing the number of future
responses for which the prediction interval is desired on the average
of the future responses.public double[] getCaseStatistics()
double
[12] array containing the case
statistics. Elements 0 through 11 contain the following:
Index | Description |
0 | Observed response |
1 | Predicted response |
2 | Residual |
3 | Leverage |
4 | Standardized residual |
5 | Jackknife residual |
6 | Cook's distance |
7 | DFFITS |
8,9 | Confidence interval on the mean |
10,11 | Prediction interval |
public double getObservedResponse()
double
containing the observed response for an
observationpublic double getPredictedResponse()
double
containing the predicted response for
an observationpublic double getResidual()
double
containing the residual for an
observationpublic double getLeverage()
double
containing the Leverage for an
observationpublic double getStandardizedResidual()
double
containing the Standardized Residual
for an observationpublic double getJackknifeResidual()
double
containing the Jackknife Residual for
an observationpublic double getCooksDistance()
double
containing Cook's Distance for an
observationpublic double getDFFITS()
double
containing the DFFITS value for an
observationpublic double[] getConfidenceInterval()
The width of the confidence interval depends on the confidence level
set by LinearRegression.CaseStatistics.setConLevelMean(double)
.
double
[2] array containing the Confidence
Interval of the population mean at the given observation.public double[] getPredictionInterval()
The width of the prediction interval depends on the confidence level
set by LinearRegression.CaseStatistics.setConLevelPred(double)
.
double
[2] array containing the Prediction
Interval of the predicted response at the given observationpublic void setConLevelPred(double conpcp)
conpcp
- a double
used to set the confidence level
for two-sided prediction intervals of a predicted response.
Note that conpcp
must be in
the interval 0
to 1
inclusive. That is, it
must be expressed as a probability.
Default: conpcp
=.95.
public void setConLevelMean(double conpcm)
conpcm
- a double
used to set the confidence level
for two-sided confidence intervals of the population mean. Note that
conpcm
must be in the interval 0
to
1
inclusive. That is, it must be expressed as a
probability.
Default: conpcm
=.95.
Copyright © 2020 Rogue Wave Software. All rights reserved.