For differencing: Let \(\Sigma\) be a covariance matrix of dimension
\(n\). Then $$\tilde{\Sigma} = \Delta_k \Sigma \Delta_k'$$
is the differenced covariance matrix with respect to row \(k = 1,\dots,n\),
where \(\Delta_k\) is a difference operator that depends on the reference
row \(k\). More precise, \(\Delta_k\) the identity matrix of dimension
\(n\) without row \(k\) and with \(-1\)s in column \(k\).
It can be computed with delta(ref = k, dim = n)
.
For un-differencing: The "un-differenced" covariance matrix \(\Sigma\)
cannot be uniquely computed from \(\tilde{\Sigma}\).
For a non-unique solution, we add a column and a row of zeros
at column and row number \(k\) to \(\tilde{\Sigma}\), respectively, and
add \(1\) to each matrix entry to make the result a proper covariance
matrix.