singh: Importance of Variables According to the Singh (1981)...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/singh.R

Description

A function to calculate the Singh (1981) criterion for importance of variables based on the squared generalized Mahalanobis distance.

S_{.j} = ∑_{i=1}^{n-1} ∑_{i'>i}^{n} (x_{ij} - x_{i'j}) * (\bold{x}_i - \bold{x}_{i'})' * \bold{Σ}_{j}^{-1}

Usage

1
2
3
4
## Default S3 method:
singh(data, cov, inverted = FALSE)
## S3 method for class 'singh'
plot(x, ...)

Arguments

data

a data frame or matrix of data (n x p).

cov

a variance-covariance matrix (p x p).

inverted

logical. If FALSE (default), cov is supposed to be a variance-covariance matrix.

x

an object of class "singh".

...

further graphical arguments.

Value

singh returns a matrix containing the Singh statistic, the importance proportion and the cummulative proprtion of each variable (column) in data.

Author(s)

Anderson Rodrigo da Silva <anderson.agro@hotmail.com>

References

Singh, D. (1981) The relative importance of characters affecting genetic divergence. Indian Journal Genetics & Plant Breeding, 41:237-245.

See Also

D2.dist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Manly (2004, p.65-66)
x1 <- c(131.37, 132.37, 134.47, 135.50, 136.17)
x2 <- c(133.60, 132.70, 133.80, 132.30, 130.33)
x3 <- c(99.17, 99.07, 96.03, 94.53, 93.50)
x4 <- c(50.53, 50.23, 50.57, 51.97, 51.37)
x <- cbind(x1, x2, x3, x4)
Cov <- matrix(c(21.112,0.038,0.078,2.01, 0.038,23.486,5.2,2.844,
	0.078,5.2,24.18,1.134, 2.01,2.844,1.134,10.154), 4, 4)
(s <- singh(x, Cov))
plot(s)

# End (not run)

biotools documentation built on Aug. 7, 2021, 9:06 a.m.