cov2weight {OGI} | R Documentation |
Weight Vectors of the Bi-unit Canonical Form
Description
cov2weight(S)
returns the numeric vector in which the diagonal
elements of the matrix D
are arranged, where DSD
is the bi-unit
canonical form of S
.
Usage
cov2weight(S, Dvec = rep(1, nrow(S)), nu = rep(1, nrow(S)), tol = 1e-06,
force = FALSE)
Arguments
S |
Covariance matrix, especially it is positive semi-definite. |
Dvec |
Numeric vector of initial values of iteration. |
nu |
Numeric vector of subjective importance. It determines the importance of each of the variates. |
tol |
Numeric number of tolerance. If the minimum eigenvalue of |
force |
Logical: if force=FALSE, |
Value
Numeric vector of diagonal elements of D
, which appears in the
bi-unit canonical form DSD
of S
.
Examples
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
}
}
weight=cov2weight(S)
weight
[Package OGI version 1.0.0 Index]