arch.bootstrap.StepM

class arch.bootstrap.StepM(benchmark: ArrayLike, models: ArrayLike, size: float = 0.05, block_size: int | None = None, reps: int = 1000, bootstrap: 'stationary' | 'sb' | 'circular' | 'cbb' | 'moving block' | 'mbb' = 'stationary', studentize: bool = True, nested: bool = False, *, seed: None | int | np.random.Generator | np.random.RandomState = None)[source]

StepM multiple comparison procedure of Romano and Wolf.

Parameters:
benchmark: ArrayLike

T element array of benchmark model losses

models: ArrayLike

T by k element array of alternative model losses

size: float = 0.05

Value in (0,1) to use as the test size when implementing the comparison. Default value is 0.05.

block_size: int | None = None

Length of window to use in the bootstrap. If not provided, sqrt(T) is used. In general, this should be provided and chosen to be appropriate for the data.

reps: int = 1000

Number of bootstrap replications to uses. Default is 1000.

bootstrap: 'stationary' | 'sb' | 'circular' | 'cbb' | 'moving block' | 'mbb' = 'stationary'

Bootstrap to use. Options are ‘stationary’ or ‘sb’: Stationary bootstrap (Default) ‘circular’ or ‘cbb’: Circular block bootstrap ‘moving block’ or ‘mbb’: Moving block bootstrap

studentize: bool = True

Flag indicating to studentize loss differentials. Default is True

nested: bool = False

Flag indicating to use a nested bootstrap to compute variances for studentization. Default is False. Note that this can be slow since the procedure requires k extra bootstraps.

seed: None | int | np.random.Generator | np.random.RandomState = None

Seed value to use when creating the bootstrap used in the comparison. If an integer or None, the NumPy default_rng is used with the seed value. If a Generator or a RandomState, the argument is used.

Notes

The size controls the Family Wise Error Rate (FWER) since this is a multiple comparison procedure. Uses SPA and the consistent selection procedure.

See [1] for detail.

See also

SPA

References

Methods

compute()

Compute the set of superior models.

reset()

Reset the bootstrap to it's initial state.

seed(value)

Seed the bootstrap's random number generator

Properties

superior_models

List of the indices or column names of the superior models