SignRestrictedSVARResult.acceptance_rate#
- property SignRestrictedSVARResult.acceptance_rate: float[source]#
Accepted rotations per draw, a direct read on how binding the signs are.
Example
Adding a second restricted shock cuts the rate roughly in half here; the rate is the Haar measure of the admissible region, up to the column flips the sampler allows:
>>> import numpy as np >>> from cultivars.multivariate.reduced_form.vector_autoregression import VAR >>> rng = np.random.default_rng(0) >>> B = np.array([[1.0, 0.5], [0.3, 1.0]]) >>> y = np.zeros((402, 2)) >>> for t in range(1, 402): ... y[t] = 0.4 * y[t - 1] + B @ rng.standard_normal(2) >>> res = VAR(y, order=1, names=("gdp", "infl")).fit() >>> one = {"demand": {"gdp": "+", "infl": "+"}} >>> two = {**one, "supply": {"gdp": "+", "infl": "-"}} >>> a = SignRestrictedSVAR(res, one, draws=200, seed=0).identify().acceptance_rate >>> b = SignRestrictedSVAR(res, two, draws=200, seed=0).identify().acceptance_rate >>> bool(0.0 < b < a <= 1.0) True