Skip to contents

Computes the bootstrap mean of the VAR coefficients, subtracts the bias from the point estimates, and iteratively shrinks the correction towards zero if the bias-corrected system is explosive (all eigenvalues of the companion matrix must be strictly less than one).

Usage

fremove_bias(beta, c, p, boot_beta)

Arguments

beta

(Np+c+M) x N matrix of OLS VAR coefficient estimates

c

Integer intercept indicator (1 if intercept included, 0 otherwise)

p

Integer VAR lag order

boot_beta

(Np+c+M) x N x nboot cube of bootstrapped VAR coefficient estimates collected from a first-pass bootstrap

Value

A list with elements: Beta: N x (Np+c+M) bias-corrected coefficient matrix (transposed relative to the input so it matches the convention used by fbootstrapCholCorrected) corrections: integer count of iterative shrinkage steps applied (1 means the first attempt was already stable)

Details

The bias is estimated as

bias = mean(boot_beta, dim=3) - beta'

If the original estimates are already explosive the function returns the uncorrected estimates. Otherwise the function applies the full bias correction and checks stability. If the corrected system is still explosive (rare in practice) it reduces the correction factor by one percent per iteration until stability is achieved or 200 attempts are exhausted, at which point the uncorrected estimates are returned.

This mirrors remove_bias.m from the MATLAB reference implementation.