ca2cm {covKCD}R Documentation

Covariance array to covariance matrix

Description

Reshape a covariance array to a covariance matrix.

Usage

ca2cm(A)

Arguments

A

a covariance array of dimension p1*p2*p1*p2.

Value

a p1*p2 by p1*p2 covariance matrix.

Author(s)

Peter Hoff

Examples

p1<-4 ; p2<-7 ; p<-p1*p2 

S<-rWishart(1,p,diag(p))[,,1] 
A<-cm2ca(S,p1,p2) 
range(S-ca2cm(A)) 


[Package covKCD version 0.1 Index]