Package jslx.statistics
Class JackKnifeEstimator
- java.lang.Object
-
- jslx.statistics.JackKnifeEstimator
-
public class JackKnifeEstimator extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected double
myDefaultLevel
protected EstimatorIfc
myEstimator
protected double
myJNEofSE
protected Statistic
myJNStatistics
protected double
myOrgEstimate
protected double[]
myOrginalData
protected Statistic
myOriginalPopStat
-
Constructor Summary
Constructors Constructor Description JackKnifeEstimator(double[] originalData, EstimatorIfc estimator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
asString()
protected void
computeJackknife()
double
getBiasCorrectedJackknifeEstimate()
double
getDefaultCILevel()
double
getJackKnifeBiasEstimate()
The estimate is (n-1)x(jne - oe), where n = the number of observations, jne is the jackknife estimate and oe = the original data estimateInterval
getJackKnifeConfidenceInterval()
The c.i.Interval
getJackKnifeConfidenceInterval(double level)
The c.i.double
getJackKnifeEstimate()
double
getJackKnifeEstimateOfSE()
double[]
getOriginalData()
double
getOriginalDataAverage()
double
getOriginalDataEstimate()
Statistic
getOriginalDataStatistics()
double[]
getPseudoValues()
nxoe - (n-1)xjne[i], where n is the number of observations, oe= original estimate and jne[i] is the ith leave one out estimatedouble
getSampleSize()
void
setDefaultCILevel(double level)
java.lang.String
toString()
-
-
-
Field Detail
-
myEstimator
protected EstimatorIfc myEstimator
-
myOriginalPopStat
protected Statistic myOriginalPopStat
-
myOrginalData
protected double[] myOrginalData
-
myOrgEstimate
protected double myOrgEstimate
-
myJNStatistics
protected Statistic myJNStatistics
-
myJNEofSE
protected double myJNEofSE
-
myDefaultLevel
protected double myDefaultLevel
-
-
Constructor Detail
-
JackKnifeEstimator
public JackKnifeEstimator(double[] originalData, EstimatorIfc estimator)
-
-
Method Detail
-
computeJackknife
protected void computeJackknife()
-
getDefaultCILevel
public final double getDefaultCILevel()
- Returns:
- the default confidence interval level
-
setDefaultCILevel
public final void setDefaultCILevel(double level)
- Parameters:
level
- the level to set must be (0,1)
-
getPseudoValues
public final double[] getPseudoValues()
nxoe - (n-1)xjne[i], where n is the number of observations, oe= original estimate and jne[i] is the ith leave one out estimate- Returns:
- an array containing the jackknife pseudo-values
-
getOriginalData
public final double[] getOriginalData()
- Returns:
- a copy of the original data
-
getSampleSize
public final double getSampleSize()
- Returns:
- the number of observations in the original generate
-
getOriginalDataAverage
public final double getOriginalDataAverage()
- Returns:
- the generate average for the original data
-
getOriginalDataEstimate
public final double getOriginalDataEstimate()
- Returns:
- the estimate from the supplied EstimatorIfc based on the original data
-
getOriginalDataStatistics
public final Statistic getOriginalDataStatistics()
- Returns:
- summary statistics for the original data
-
getJackKnifeEstimate
public final double getJackKnifeEstimate()
- Returns:
- the average of the leave one out samples
-
getJackKnifeEstimateOfSE
public final double getJackKnifeEstimateOfSE()
- Returns:
- the jackknife estimate of the standard error
-
getJackKnifeConfidenceInterval
public final Interval getJackKnifeConfidenceInterval()
The c.i. is based on the Student-t distribution and the jackknife estimate and its estimate of the standard error- Returns:
- the interval
-
getJackKnifeConfidenceInterval
public final Interval getJackKnifeConfidenceInterval(double level)
The c.i. is based on the Student-t distribution and the jackknife estimate and its estimate of the standard error- Parameters:
level
- the confidence level, must be in (0,1)- Returns:
- the interval
-
getJackKnifeBiasEstimate
public final double getJackKnifeBiasEstimate()
The estimate is (n-1)x(jne - oe), where n = the number of observations, jne is the jackknife estimate and oe = the original data estimate- Returns:
- the estimate of the bias based on jackknifing
-
getBiasCorrectedJackknifeEstimate
public final double getBiasCorrectedJackknifeEstimate()
- Returns:
- the bias corrected jackknife estimate, getOriginalDataEstimate() - getJackKnifeBiasEstimate()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
asString
public java.lang.String asString()
-
-