cultivars.multivariate.nonlinear.functional_coefficient#
The functional-coefficient VAR: every state value gets its own system.
This is the nonparametric end of the observed-transition family. A threshold VAR assigns each value of an observable state one of two systems; a smooth-transition VAR blends the same two anchors; here the coefficient matrices are unknown smooth functions of the state,
with \(s\) one of the variables or an external series (Chen and Tsay, 1993; Cai, Fan and Yao, 2000), and nothing is assumed about the functions but smoothness. Estimation is local-linear kernel regression: at each evaluation point \(u\) the level and the state-derivative of every coefficient solve one Epanechnikov-weighted least squares on the augmented design \([x_t,\ x_t (z_t - u)]\),
all equations sharing the weights, and \(a(u)\) is the reported curve. The payoff is diagnostic as much as predictive: the estimated curves show whether transmission actually varies in the state, and whether its variation looks like a threshold, a smooth transition, or something neither parametric family can express – which is why this model is the natural specification check on both.
Two commitments shape the surface. First, the price of assuming nothing is
paid in two currencies the result reports honestly. Statistical: there is
no likelihood and no parameter count – the estimator’s complexity is the
trace of its smoother matrix, reported as effective_params, and no
information criteria are derivable from a kernel fit, so none are
reported. Practical: everything is local, so the curves are trustworthy
only where the state has mass – they are reported on a trimmed grid,
refuse to extrapolate beyond it, carry pointwise bands that are
conditional on the bandwidth rather than accounting for its selection,
and read coefficients between grid points by linear interpolation. Second,
the bandwidth is the model’s one tuning constant and is chosen, when
unstated, by exact leave-one-out cross-validation – the deletion residual
from the smoother diagonal, no refitting – over a geometric grid around
the Silverman rule \(2.34\,\hat\sigma_z\, n^{-1/5}\); there is no
delay search, because searching the delay and the bandwidth together would
let the smoother trade one against the other invisibly.
One identification fact is handled by construction rather than by a
warning. When the state is one of the design’s own lag columns – the
self-exciting case with delay <= order – the intercept function’s
local slope \(1 \cdot (z_t - u)\) is exactly collinear with the
design, so the intercept is fitted local-constant while every other
coefficient stays local-linear; the engine’s _state_in_design note
states the algebra.
Layout. FunctionalCoefficientVAR validates on
_FunctionalCoefficientVectorAutoRegressionModel in _internals,
which takes the named-or-external state, its delay and the aligned design
from _ObservedRegimeVectorModel – the base the threshold and
smooth-transition VARs share – and adds the kernel engine: _local_fit
solves one weighted system, _cross_validation_score scores a candidate
bandwidth, and _fit_functional lays the trimmed grid, selects the
bandwidth, evaluates the curves and their sandwich standard errors, and
packs a _VectorFunctionalFit. FunctionalCoefficientVARResult
takes its summary from _SummaryMixin and builds the state-frozen
companion for irf and stability_curve through
companion_matrix(). The two-system and two-anchor
members of the family are threshold
and smooth_transition; the
model whose coefficients drift in time rather than in a state is
time_varying.
References
Chen, R., & Tsay, R. S. (1993). Functional-coefficient autoregressive models. Journal of the American Statistical Association, 88(421), 298-308.
Cai, Z., Fan, J., & Yao, Q. (2000). Functional-coefficient regression models for nonlinear time series. Journal of the American Statistical Association, 95(451), 941-956.
Hastie, T., & Tibshirani, R. (1993). Varying-coefficient models. Journal of the Royal Statistical Society, Series B, 55(4), 757-796.
Fan, J., & Gijbels, I. (1996). Local Polynomial Modelling and Its Applications. Chapman and Hall. Chapter 3.
Example
The specification check in action: a threshold truth, in which the
own-lag coefficient of y1 is 0.7 below zero and -0.3 above, read
through the kernel. The curve is flat near 0.7 at the low end and
descends through the threshold, the shape a threshold VAR would be
the parsimonious account of:
>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> y = np.zeros((300, 2))
>>> for t in range(1, 300):
... a = 0.7 if y[t - 1, 0] <= 0.0 else -0.3
... y[t, 0] = a * y[t - 1, 0] + 0.5 * rng.standard_normal()
... y[t, 1] = 0.4 * y[t - 1, 1] + 0.3 * y[t - 1, 0] + 0.5 * rng.standard_normal()
>>> res = FunctionalCoefficientVAR(y, order=1, transition_variable="y1").fit(n_grid=21)
>>> res.bandwidth_searched, res.effective_params > 3.0
(True, True)
>>> curve = res.coefficient_curve("y1", "y1.L1")[:, 1]
>>> bool(abs(curve[:5].mean() - 0.7) < 0.1), bool(curve[-5:].mean() < 0.3)
(True, True)
>>> bool(np.all(np.diff(curve[5:]) < 0.0))
True
>>> low, high = res.state_range
>>> bool(res.coefficients_at(low)[0, 0, 0] > res.coefficients_at(high)[0, 0, 0])
True
Classes#
Functional-coefficient VAR, after Cai, Fan and Yao: local-linear estimation. |
|
A fitted functional-coefficient VAR: coefficient curves over the state. |