This function combines the sample covariance information from two samples (of the same phenomena) to return the sample covariance matric of the union of the two samples.
mergeCovmat(
A.cov.xy,
B.cov.xy,
A.mean.x,
A.mean.y,
B.mean.x,
B.mean.y,
A.n,
B.n
)
sample covariance matrix from the first sample, 'A'
sample covariance matrix from the second sample, 'B'
sample mean from the first sample, 'A'
sample mean from the first sample, 'A'
sample mean from the second sample, 'B'
sample mean from the second sample, 'B'
sample size from the first sample, 'A'
sample size from the second sample, 'B'
This function assumes the data is normalized by n (the MLE estimator) instead of n-1 (the unbiased estimator).
Pebay, P., 2008, Formulas for Robust, One-Pass Parallel Computation of Covariances and Arbitrary-Order Statistical Moments: Sandia Report.