Description Usage Arguments Details Value Examples
View source: R/SampleBiasedCovarianceMatrix.R View source: R/SampleBiasedCovarianceVarianceMatrix.R
Returns a matrix of the covariance withvariance (baised) of the given matrix.
Returns a matrix of the covariance withvariance (baised) of the given matrix.
1 2 3 |
x |
A Matrix, where each variable represents a column |
x |
A Matrix, where each variable represents a column |
Given a matrix of data, an algorithm is employed to calculate the sample covariance and variance (biased) matrix. The variance values are located on the diagonal of the matrix, x11,x22...xpp; while the covariance values are located in the other positions. Note: Uses SampleMeanVector function.
Given a matrix of data, an algorithm is employed to calculate the sample covariance and variance (biased) matrix. The variance values are located on the diagonal of the matrix, x11,x22...xpp; while the covariance values are located in the other positions. Note: Uses SampleMeanVector function.
A vector of the sample means
A vector of the sample means
1 2 3 4 5 6 | myMat = c(3,4,2,6,8,2,5, 5,5.5,4,7,10,5,7.5)
dim(myMat) = c(7,2) # Creates a 2x7 matrix
mySampleCovarianceVarianceVariable = SampleBiasedCovarianceVariance(myMat)
myMat = c(3,4,2,6,8,2,5, 5,5.5,4,7,10,5,7.5)
dim(myMat) = c(7,2) # Creates a 2x7 matrix
mySampleCovarianceVarianceVariable = SampleBiasedCovarianceVariance(myMat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.