SampleBiasedCovarianceVariance: Sample (Biased) Covariance with Variance

Description Usage Arguments Details Value Examples

View source: R/SampleBiasedCovarianceMatrix.R View source: R/SampleBiasedCovarianceVarianceMatrix.R

Description

Returns a matrix of the covariance withvariance (baised) of the given matrix.

Returns a matrix of the covariance withvariance (baised) of the given matrix.

Usage

1
2
3

Arguments

x

A Matrix, where each variable represents a column

x

A Matrix, where each variable represents a column

Details

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.

Value

A vector of the sample means

A vector of the sample means

Examples

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)

OUStudent/Lab1Intro documentation built on Jan. 30, 2020, 6:25 a.m.