org.codehaus.jet.hypothesis.rejection.estimators
Class CriticalValueEstimator

java.lang.Object
  extended by org.codehaus.jet.hypothesis.rejection.estimators.AbstractRejectionValueEstimator
      extended by org.codehaus.jet.hypothesis.rejection.estimators.CriticalValueEstimator
All Implemented Interfaces:
RejectionValueEstimator

public class CriticalValueEstimator
extends AbstractRejectionValueEstimator

Estimator of critical value for unit roots and cointegration tests.

Author:
Mauro Talevi
See Also:
RejectionValueEstimator

Field Summary
 
Fields inherited from class org.codehaus.jet.hypothesis.rejection.estimators.AbstractRejectionValueEstimator
distribution, gls, responseSurfaceEvaluator
 
Constructor Summary
CriticalValueEstimator(int numberOfPoints, double threshold)
          Creates a CriticalValueEstimator
CriticalValueEstimator(ResponseSurfaceEvaluator responseSurfaceEvaluator, int numberOfPoints, double threshold)
          Creates a CriticalValueEstimator
 
Method Summary
 double estimateAsymptoticValue(double[] norms, double[] probs, double[] weights, double[] criticalValues, double level)
          Estimates an asymptotic rejection value
 double estimateValue(double[] norms, double[] probs, double[] weights, double[][] beta, int sampleSize, int[] params, double level)
          Estimates a rejection value
protected  double[] toMiddleYSample(double[][] beta, int min, int np, int sampleSize, int[] params)
           
protected  double[] toTailYSample(double[][] beta, int min, int np, int sampleSize, int[] params, boolean upper)
           
protected  double[] toYSample(double[][] beta, int min, int np, int sampleSize, int[] params)
           
 
Methods inherited from class org.codehaus.jet.hypothesis.rejection.estimators.AbstractRejectionValueEstimator
calculateMinimizingIndex, cumulativeNormal, extractMiddleColumnPoints, extractTailColumnPoints, getNumberOfPoints, getTailPoints, getThreshold, glsRegression, inverseCumulativeNormal, isLower, isMiddle, powerSeries, toCovariance, toCriticalValues, toMiddleCovariance, toMiddleIndex, toMiddleXSample, toMiddleYSample, toTailCovariance, toTailXSample, toTailYSample, toUpperIndex, toXSample, toYSample, tTest, validateParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CriticalValueEstimator

public CriticalValueEstimator(int numberOfPoints,
                              double threshold)
Creates a CriticalValueEstimator

Parameters:
numberOfPoints - the number of points used in the regression
threshold - the threshold used for the t-test

CriticalValueEstimator

public CriticalValueEstimator(ResponseSurfaceEvaluator responseSurfaceEvaluator,
                              int numberOfPoints,
                              double threshold)
Creates a CriticalValueEstimator

Parameters:
responseSurfaceEvaluator - the ResponseSurfaceEvaluator
numberOfPoints - the number of points used in the regression
threshold - the threshold used for the t-test
Method Detail

estimateValue

public double estimateValue(double[] norms,
                            double[] probs,
                            double[] weights,
                            double[][] beta,
                            int sampleSize,
                            int[] params,
                            double level)
Description copied from interface: RejectionValueEstimator
Estimates a rejection value

Parameters:
norms - the normalisations used to construct the regressors matrix
probs - the probabilities used to construct the covariance matrix
weights - the weights sed to construct the covariance matrix
beta - the beta values
sampleSize - the sample size
params - the params specific to different tests
level - the significance level
Returns:
A rejection value

estimateAsymptoticValue

public double estimateAsymptoticValue(double[] norms,
                                      double[] probs,
                                      double[] weights,
                                      double[] criticalValues,
                                      double level)
Description copied from interface: RejectionValueEstimator
Estimates an asymptotic rejection value

Parameters:
norms - the normalisations used to construct the regressors matrix
probs - the probabilities used to construct the covariance matrix
weights - the weights used to construct the covariance matrix
criticalValues - the criticalvalues
level - the significance level
Returns:
A rejection value

toYSample

protected double[] toYSample(double[][] beta,
                             int min,
                             int np,
                             int sampleSize,
                             int[] params)

toMiddleYSample

protected double[] toMiddleYSample(double[][] beta,
                                   int min,
                                   int np,
                                   int sampleSize,
                                   int[] params)

toTailYSample

protected double[] toTailYSample(double[][] beta,
                                 int min,
                                 int np,
                                 int sampleSize,
                                 int[] params,
                                 boolean upper)


Copyright © 2006-2007. All Rights Reserved.