def _var_acf(coefs, sig_u):
 (p, k, k2) = coefs.shape
 assert (k == k2)
 A = util.comp_matrix(coefs)
 SigU = np.zeros(((k * p), (k * p)))
 SigU[:k, :k] = sig_u
 vecACF = L.solve((np.eye(((k * p) ** 2)) - np.kron(A, A)), vec(SigU))
 acf = unvec(vecACF)
 acf = acf[:k].T.reshape((p, k, k))
 return acf

def _var_acf ( coefs , sig_u ) : ( p , k , k2 ) = coefs . shape assert ( k == k2 ) A = util . comp_matrix ( coefs ) SigU = np . zeros ( ( ( k * p ) , ( k * p ) ) ) SigU [ : k , : k ] = sig_u vecACF = L . solve ( ( np . eye ( ( ( k * p ) ** 2 ) ) - np . kron ( A , A ) ) , vec ( SigU ) ) acf = unvec ( vecACF ) acf = acf [ : k ] . T . reshape ( ( p , k , k ) ) return acf
compute autocovariance function acf_y(h) for h=1 .