MIDASVARResult.joint_stderr#
- MIDASVARResult.joint_stderr()[source]#
Standard errors that also account for estimating the lag polynomial.
The default surface –
bse,tvalues,conf_int, and the coefficient table – conditions on the estimated polynomial, treating the compressed regressor as data. Here the observed information of the covariance-concentrated Gaussian likelihood,\[\ell_c(\beta, \theta) = -\tfrac{T}{2} \log\det\bigl(\hat\Sigma(\beta, \theta)\bigr) + \text{const},\]is computed numerically over the full parameter vector, every regression coefficient and every polynomial parameter jointly, and inverted. The profile-likelihood curvature is the correct marginal information for the retained parameters, so concentrating the covariance out changes nothing about the answer while removing
k(k+1)/2dimensions from the Hessian.The cost is quadratic in the parameter count – each Hessian entry is four likelihood evaluations – which is why this is a method rather than the default.
- Return type:
- Returns:
Mapping from parameter to its joint standard error – every key of
params, plus"theta1[x]"and"theta2[x]"per high-frequency series.- Raises:
NumericalError – If the observed information is not positive definite at the estimate, which usually means the polynomial is weakly identified – a flat weight curve makes
thetaunidentifiable and its rows of the information singular.
Example
The slope on the compressed regressor is where the polynomial matters, so its joint error exceeds the conditional one; the autoregressive coefficients barely move:
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> x = rng.standard_normal((360, 1)) >>> window = 0.7 * x[2::3, 0] + 0.3 * x[1::3, 0] >>> noise = 0.1 * rng.standard_normal(120) >>> y = np.column_stack([window + noise, rng.standard_normal(120)]) >>> res = MIDASVAR(y, x, order=1, period=3).fit() >>> joint = res.joint_stderr() >>> len(joint), len(res.params) + 2 (10, 10) >>> bool(joint["y1: x1"] > res.bse["y1: x1"]) True >>> bool(abs(joint["y1: y1.L1"] / res.bse["y1: y1.L1"] - 1.0) < 0.1) True