StudentBVARResult._replication_noise#

StudentBVARResult._replication_noise(draw, rng)[source]#

Student-t in-sample innovations: a replication keeps the fat tails.

Parameters:
  • draw (int) – Index of the kept draw.

  • rng (Generator) – Random generator.

Return type:

NDArray[double]

Returns:

An array of shape (nobs, k) – one row per effective-sample date, the shape posterior_replications() expects.

Example

>>> import numpy as np
>>> y = np.random.default_rng(0).standard_normal((120, 2))
>>> res = StudentBVAR(y, order=1).fit(df=5.0, n_draws=30, n_burn=10, seed=0)
>>> res._replication_noise(0, np.random.default_rng(0)).shape
(119, 2)