

def _compute_multivariate_pacf_from_coefficients(constrained, error_variance, order=None, k_endog=None):
    '\n    Transform matrices corresponding to a stationary (or invertible) process\n    to matrices with singular values less than one.\n\n    Parameters\n    ----------\n    constrained : array or list\n        The coefficients matrices. If a list, should be a list of length\n        `order`, where each element is an array sized `k_endog` x `k_endog`. If\n        an array, should be the coefficient matrices horizontally concatenated\n        and sized `k_endog` x `k_endog * order`.\n    error_variance : array\n        The variance / covariance matrix of the error term. Should be sized\n        `k_endog` x `k_endog`.\n    order : integer, optional\n        The order of the autoregression.\n    k_endog : integer, optional\n        The dimension of the data vector.\n\n    Returns\n    -------\n    pacf : list\n        List of first `order` multivariate partial autocorrelations.\n\n    Notes\n    -----\n    Note that this computes multivariate partial autocorrelations.\n\n    Corresponds to the inverse of Lemma 2.1 in Ansley and Kohn (1986). See\n    `unconstrain_stationary_multivariate` for more details.\n\n    Notes\n    -----\n\n    Coefficients are assumed to be provided from the VAR model:\n\n    .. math::\n        y_t = A_1 y_{t-1} + \\dots + A_p y_{t-p} + \x0barepsilon_t\n    '
    if (type(constrained) == list):
        order = len(constrained)
        k_endog = constrained[0].shape[0]
    else:
        (k_endog, order) = constrained.shape
        order //= k_endog
    _acovf = _compute_multivariate_acovf_from_coefficients
    autocovariances = [autocovariance.T for autocovariance in _acovf(constrained, order, maxlag=order)]
    return _compute_multivariate_pacf_from_autocovariances(autocovariances)

dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/statespace/tools.py _compute_multivariate_pacf_from_coefficients/VarMisuse@90/662 `error_variance`->`order`