MVcov: Correlation, Variance and Covariance of a Multivariate Data...

Description Usage Arguments Details Value Author(s) Examples

View source: R/MVcov.R

Description

The function MVcov computes the Covariance of a multivariate data set x and the covariance or correlation between x(i) and x(i+b). Covariance γ(q) = Cov(Xi,Xi+q) of a Data Set where X is a multivariate data set

Usage

1
MVcov(x, bmax = 10)

Arguments

x

Multivariate data

bmax

γ(q) = Cov(Xi,Xi+q), the maximun value of q

Details

The input x must be a matrix. MVcov() computes covariance matrix between X(i) and X(i+q),where X(i) and X(i+q) are multivariate process observations obtained at times i and i + q where q =0,1,2.....bmax. Covariance γ(q) = Cov(Xi,Xi+q), where X is a p-dimensinal vector and γ(q) will be a p by p matrix. The default value of bmax is 10, which means the output will be [γ(0),γ(1),.....γ(10)] where γ(q) = Cov(X(i),X(i+q)) a p by p matrix, so the output will be a p by 11*p matrix.

Value

Multivariate Covariance Matrix [γ(0),γ(1),.....γ(bmax)] where γ(q) = Cov(Xi,Xi+q) a p by p matrixs

Author(s)

Xiulin Xie

Examples

1
MVcov(matrix(rnorm(900,0,1),nrow = 3))$cov_vector

XiulinXie/SPCmonitor2 documentation built on Dec. 10, 2019, 12:10 a.m.