powered by
cov2biu(S) returns the bi-unit canonical form of S.
cov2biu(S)
S
cov2biu(S, nu = rep(1, nrow(S)), force = FALSE, detail = FALSE)
Covariance matrix, especially it is positive semi-definite.
Numeric vector of subjective importance. It determines the importance of each of the variates.
Logical: if force=FALSE, S should be strictly positive definite. Default: FALSE.
Logical: if detail=TRUE, it returns the list of the bi-unit form and the weight vectors. Default: FALSE.
Numeric matrix of the bi-unit canonical form \(DSD\) of \(S\).
# NOT RUN { S = matrix(0, 5, 5) S[1,1] = 1 for(j in 2:5) S[1,j] = S[j,1] = -0.5 for(i in 2:5){ for(j in 2:5){ if(i == j) S[i,j] = 1 else S[i,j] = 0.5 } } B=cov2biu(S) B # }
Run the code above in your browser using DataLab