constructing proper DE and obs cov for resids