public class PattonPolitisWhite2009ForObject<X> extends Object implements ObjectResampler<X>
Modifier and Type | Class and Description |
---|---|
static interface |
PattonPolitisWhite2009ForObject.AutoCorrelationForObject |
static interface |
PattonPolitisWhite2009ForObject.AutoCovarianceForObject |
static class |
PattonPolitisWhite2009ForObject.Type |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CACHE_SIZE
The default cache size = the number of available processors ×
1000.
|
Modifier and Type | Method and Description |
---|---|
static long |
getOptimalBlockLength(Object[] x,
PattonPolitisWhite2009ForObject.AutoCorrelationForObject autoCorrelation,
PattonPolitisWhite2009ForObject.AutoCovarianceForObject autoCovariance,
PattonPolitisWhite2009ForObject.Type type)
Computes the optimal of block length.
|
static long |
getOptimalLag(Object[] x,
PattonPolitisWhite2009ForObject.AutoCorrelationForObject R)
Finds the smallest lag \(\hat{m}\) such that the autocorrelation for lags
\((\hat{m} +
k),~k=1,\dots,K_N\) are all insignificant regarding to the critical
value.
|
X[] |
newResample()
Gets a resample from the original sample.
|
void |
seed(long... seeds)
Seed the random number/vector/scenario generator to produce repeatable experiments.
|
public static final int DEFAULT_CACHE_SIZE
public PattonPolitisWhite2009ForObject(X[] sample, Class<X> clazz, PattonPolitisWhite2009ForObject.AutoCorrelationForObject autoCorrelation, PattonPolitisWhite2009ForObject.AutoCovarianceForObject autoCovariance)
sample
- the original sampleclazz
- the class of the sample objectsautoCorrelation
- the autocorrelation function for the sample
objectsautoCovariance
- the autocovariance function for the sample objectspublic PattonPolitisWhite2009ForObject(X[] sample, Class<X> clazz, PattonPolitisWhite2009ForObject.AutoCorrelationForObject autoCorrelation, PattonPolitisWhite2009ForObject.AutoCovarianceForObject autoCovariance, PattonPolitisWhite2009ForObject.Type type)
sample
- the original sampleclazz
- the class of the sample objectsautoCorrelation
- the autocorrelation function for the sample
objectsautoCovariance
- the autocovariance function for the sample objectstype
- the type of block bootstrap, either
PattonPolitisWhite2009ForObject.Type.STATIONARY or
PattonPolitisWhite2009ForObject.Type.CIRCULARpublic PattonPolitisWhite2009ForObject(X[] sample, Class<X> clazz, PattonPolitisWhite2009ForObject.AutoCorrelationForObject autoCorrelation, PattonPolitisWhite2009ForObject.AutoCovarianceForObject autoCovariance, PattonPolitisWhite2009ForObject.Type type, RandomLongGenerator uniform, RandomNumberGenerator rng)
sample
- the original sampleclazz
- the class of the sample objectsautoCorrelation
- the autocorrelation function for the sample
objectsautoCovariance
- the autocovariance function for the sample objectstype
- the type of block bootstrap, either
PattonPolitisWhite2009ForObject.Type.STATIONARY or
PattonPolitisWhite2009ForObject.Type.CIRCULARuniform
- a concurrent random long generatorrng
- a concurrent random exponential generatorpublic PattonPolitisWhite2009ForObject(X[] sample, Class<X> clazz, long blockLength, PattonPolitisWhite2009ForObject.Type type, RandomLongGenerator uniform, RandomNumberGenerator rng)
sample
- the original sampleclazz
- the class of the sample objectsblockLength
- the block lengthtype
- the type of block bootstrap, either
PattonPolitisWhite2009ForObject.Type.STATIONARY or
PattonPolitisWhite2009ForObject.Type.CIRCULARuniform
- a uniform random number generatorrng
- a random exponential generatorpublic PattonPolitisWhite2009ForObject(X[] sample, Class<X> clazz, long blockLength, PattonPolitisWhite2009ForObject.Type type, ConcurrentCachedRLG rlg, ConcurrentCachedRNG rng)
sample
- the original sampleclazz
- the class of the sample objectsblockLength
- the block lengthtype
- the type of block bootstrap, either
PattonPolitisWhite2009ForObject.Type.STATIONARY or
PattonPolitisWhite2009ForObject.Type.CIRCULARrlg
- a concurrent random long generatorrng
- a concurrent random exponential generatorpublic static long getOptimalBlockLength(Object[] x, PattonPolitisWhite2009ForObject.AutoCorrelationForObject autoCorrelation, PattonPolitisWhite2009ForObject.AutoCovarianceForObject autoCovariance, PattonPolitisWhite2009ForObject.Type type)
x
- the datatype
- the type of block bootstrap methodpublic static long getOptimalLag(Object[] x, PattonPolitisWhite2009ForObject.AutoCorrelationForObject R)
x
- the datapublic void seed(long... seeds)
Seedable
public X[] newResample()
ObjectResampler
newResample
in interface ObjectResampler<X>
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.