public class PattonPolitisWhite2009 extends Object implements Resampler
Constructor and Description |
---|
PattonPolitisWhite2009(double[] sample)
Constructs a block bootstrap sample generator.
|
PattonPolitisWhite2009(double[] sample,
long blockLength,
PattonPolitisWhite2009ForObject.Type type,
ConcurrentCachedRLG rlg,
ConcurrentCachedRNG rng)
Constructs a block bootstrap sample generator.
|
PattonPolitisWhite2009(double[] sample,
long blockLength,
PattonPolitisWhite2009ForObject.Type type,
RandomLongGenerator uniform,
RandomNumberGenerator rng)
Constructs a block bootstrap sample generator.
|
PattonPolitisWhite2009(double[] sample,
PattonPolitisWhite2009ForObject.Type type)
Constructs a block bootstrap sample generator.
|
PattonPolitisWhite2009(double[] sample,
PattonPolitisWhite2009ForObject.Type type,
RandomLongGenerator uniform,
RandomNumberGenerator rng)
Constructs a block bootstrap sample generator.
|
Modifier and Type | Method and Description |
---|---|
static long |
getOptimalBlockLength(double[] x,
PattonPolitisWhite2009ForObject.Type type)
Computes the optimal of block length.
|
static long |
getOptimalLag(double[] x)
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.
|
double[] |
newResample()
Gets a resample from the original sample.
|
void |
seed(long... seeds)
Seed the random number/vector/scenario generator to produce repeatable experiments.
|
public PattonPolitisWhite2009(double[] sample, long blockLength, PattonPolitisWhite2009ForObject.Type type, ConcurrentCachedRLG rlg, ConcurrentCachedRNG rng)
sample
- the original sampleblockLength
- 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 PattonPolitisWhite2009(double[] sample, long blockLength, PattonPolitisWhite2009ForObject.Type type, RandomLongGenerator uniform, RandomNumberGenerator rng)
sample
- the original sampleblockLength
- 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 PattonPolitisWhite2009(double[] sample, PattonPolitisWhite2009ForObject.Type type, RandomLongGenerator uniform, RandomNumberGenerator rng)
sample
- the original sampletype
- the type of block bootstrap, either
PattonPolitisWhite2009ForObject.Type.STATIONARY or
PattonPolitisWhite2009ForObject.Type.CIRCULARuniform
- a concurrent random long generatorrng
- a concurrent random exponential generatorpublic PattonPolitisWhite2009(double[] sample, PattonPolitisWhite2009ForObject.Type type)
sample
- the original sampletype
- the type of block bootstrap, either
PattonPolitisWhite2009ForObject.Type.STATIONARY or
PattonPolitisWhite2009ForObject.Type.CIRCULARpublic PattonPolitisWhite2009(double[] sample)
sample
- the original samplepublic static long getOptimalBlockLength(double[] x, PattonPolitisWhite2009ForObject.Type type)
x
- the datatype
- the type of block bootstrap methodpublic static long getOptimalLag(double[] x)
x
- the datapublic void seed(long... seeds)
Seedable
public double[] newResample()
Resampler
newResample
in interface Resampler
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.