'Compute asymptotic standard errors for cumulative impulse response
coefficients
Parameters
orth : boolean
Notes
eq. 3.7.7 (non-orth), 3.7.10 (orth)
Returns'

def cum_effect_cov(self, orth=False):

    Ik = np.eye(self.neqs)
    PIk = np.kron(self.P.T, Ik)
    F = 0.0
    covs = self._empty_covm((self.periods + 1))
    for i in range((self.periods + 1)):
        if (i > 0):
            F = (F + self.G[(i - 1)])
        if orth:
            if (i == 0):
                apiece = 0
            else:
                Bn = np.dot(PIk, F)
                apiece = chain_dot(Bn, self.cov_a, Bn.T)
            Bnbar = np.dot(np.kron(Ik, self.cum_effects[i]), self.H)
            bpiece = (chain_dot(Bnbar, self.cov_sig, Bnbar.T) / self.T)
            covs[i] = (apiece + bpiece)
        else:
            if (i == 0):
                covs[i] = np.zeros(((self.neqs ** 2), (self.neqs ** 2)))
                continue
            covs[i] = chain_dot(F, self.cov_a, F.T)
    return covs
