Home > OS >  Is there a R function or Python for finding the covariance-matrix of a random vector?
Is there a R function or Python for finding the covariance-matrix of a random vector?

Time:09-18

enter image description here

enter image description here

https://www.biostat.jhsph.edu/~iruczins/teaching/140.751/notes/ch3.pdf

Every R function or Python function I found finds the covariance between two vectors or returns a scalar, but I want a function that takes vector and returns a matrix.

CodePudding user response:

There is one for numpy arrays: https://numpy.org/doc/stable/reference/generated/numpy.cov.html .

  • Related