ogi: Objective General Index

Description Usage Arguments Details Value References Examples

Description

ogi(X) returns the objective general index (OGI) of the covariance matrix S of X.

Usage

1
2
ogi(X, se = FALSE, force = FALSE, se.loop = 1000, nu = rep(1, ncol(X)),
  center = TRUE, mar = FALSE)

Arguments

X

Numeric or ordered matrix.

se

Logical: if se=TRUE, it additionally computes w.se and v.se by bootstrap. Default: FALSE.

force

Logical: if force=FALSE, S should be strictly positive definite. Default: FALSE.

se.loop

Iteration number in bootstrap for computation of standard error.

nu

Numeric vector of subjective importance. It determines the importance of each column of X.

center

Logical: if center=TRUE, ogi(X)$Z is centered. Default:TRUE.

mar

Logical: if mar=TRUE, each of ordered categorical variates of X (if exists) is marginally converted into a numeric vector in advance by the univariate OGI quantification. If mar=FALSE, the simultaneous OGI quantification is applied. Default:FALSE.

Details

Consider a data matrix of n individuals with p variates. The objective general index (OGI) is a general index that combines the p variates into a univariate index in order to rank the n individuals. The OGI is always positively correlated with each of the variates. For more details, see the references.

Value

value

The objective general index (OGI).

X

The input matrix X.

scaled

The product of Z %*% diag(weight), where Z and weight are as follows.

Z

Numerical matrix converted from X. If center = TRUE, it is centered.

weight

The output of cov2weight(S, nu=nu, force=force), where S is the covariance matrix of X.

rel.weight

The product of weight * sqrt(diag(S)), where S is the covariance matrix of X.

biu

The bi-unit canonical form of the covariance matrix of X.

idx

Numeric vector. If X has ordered categorical variates, idx has (number of levels) -1 number of indexes.

w.se

If requested, w.se is numeric vector of the standard error of weight. It is calculated by bootstrap.

v.se

If requested, v.se is numeric vector of the standard error of value. It is calculated by bootstrap.

References

Sei, T. (2016). An objective general index for multivariate ordered data, Journal of Multivariate Analysis, 147, 247-264. http://www.sciencedirect.com/science/article/pii/S0047259X16000269

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
CT = matrix(c(
2,1,1,0,0,
8,3,3,0,0,
0,2,1,1,1,
0,0,0,1,1,
0,0,0,0,1), 5, 5, byrow=TRUE)
X = matrix(0, 0, 2)
for(i in 1:5){
  for(j in 1:5){
    if(CT[i,j]>0){
      X = rbind(X, matrix(c(6-i,6-j), CT[i,j], 2, byrow=TRUE))
    }
  }
}
X0 = X
X = as.data.frame(X0)
X[,1] = factor(X0[,1], ordered=TRUE)
X[,2] = factor(X0[,2], ordered=TRUE)
ogiX = ogi(X)
par(pty="s", cex=1.7, mar=c(4.5,3,1,1))
plot(ogiX$scaled, xlim=c(-3,3), ylim=c(-3,3), xlab="Geometry", ylab="Probability")
for(t in 1:nrow(ogiX$scaled)){
  xy = ogiX$scaled[t,]
  g = rep(sum(xy)/2, 2)
  segments(xy[1], xy[2], g[1], g[2], lty=2)
}
arrows(-3, -3, 3, 3)
text(2.5, 2, "OGI/2")
ogiX


f = ordered(1:10)
f[sample(1:10, 20, replace=TRUE)]
Y = ogi(f)$value
plot((1:10)/(10+1), Y, type="b")
xs = (1:1000)/1001
points(xs, qnorm(xs), type="l", col="red")


X = USJudgeRatings
ogiX = ogi(X)
nameX = ordered(names(X), names(X))
plot(nameX, ogiX$weight, las=3, cex.axis=0.8, ylim=c(0,1.2), ylab="weight")

OGI documentation built on May 2, 2019, 8:55 a.m.

Related to ogi in OGI...