updateCovmat | R Documentation |
Update covariance matrix using a stable one-pass algorithm. This is much more
efficient than using cov
on the full data.
updateCovmat(covmat, thetaMean, theta, i)
covmat |
covariance matrix at iteration |
thetaMean |
mean vector at iteration |
theta |
vector of new value at iteration |
i |
current iteration. |
A list of two elements
covmat
update covariance matrix
thetaMean
updated mean vector
http://en.wikipedia.org/wiki/Algorithms%5Ffor%5Fcalculating%5Fvariance#Covariance # nolint
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.