mmds.project {bios2mds}R Documentation

Metric multidimensional Scaling Projection

Description

Performs metric MultiDimensional Scaling (MDS) analysis of active elements and projects supplementary elements onto the active space defined by active elements.

Usage

mmds.project(mmds, sup, pc = 3, group.file = NULL)

Arguments

mmds

an object of class 'mmds', obtained from mmds, providing the active elements.

sup

a numeric matrix of distances between supplementary and active elements.

pc

a numeric value indicating the number of principal components to be saved. Default is 3.

group.file

a string of characters to indicate the file name assigning groups and colors to each supplementary element of the sup matrix.

Details

Metric multidimensional scaling is a statistical analysis technique aimed at analyzing a matrix of distances between 'active' elements. MDS maps the elements onto a low dimensional space (usually 2D or 3D). In this space, elements are represented by points whose respective distances best approximate the initial distance. In addition, after the metric MDS analysis of active elements, the mmds.project function allows projecting supplementary elements onto the active space in the context of the R environment. The active space is defined only by the MDS analysis of the active elements. The position of supplementary elements onto the active space depends only on their distances to active elements.

sup must have some characteristics:

The method for the computation of metric MDS projection of supplementary data is described by Abdi (2007). Briefly, if N is the number of active sequences and D is the N by N matrix of the squared distances computed from the active matrix, the mmds function performs the following steps:

(1)

Transforms D into a cross-product matrix S:

\bold{S} = -0.5 [\bold{I} - \bold{m}^{T}\bold{1}] \times \bold{D} \times [\bold{I} - \bold{m}^{T}\bold{1}]^{T}

where I is the N by N identity matrix, m is the N by 1 matrix mass, where each mass equal to \frac{1}{N} and 1 is an N by N matrix of ones.

(2)

Transforms S into a factor matrix F:

\bold{F} = \bold{M}^{\frac{-1}{2}}\bold{U\Lambda}^{\frac{1}{2}}

where M is the diag{m}, U is the eigenvector matrix and \bold{\Lambda} is the diagonal matrix of the eigenvalues, such as S = \bold{{U{\Lambda}U}^T}, where \bold{^T} denotes the transposition operation.

The eigenvectors of S, also called principal components (whose number is smaller or equal to N), form the active space. F gives the coordinates of the active elements in this space.

The supplementary elements are projected onto the active space as described below. If N_{sup} is the number of supplementary sequences and if D_{sup} is the N_{sup} by N matrix of the squared distances, the mmds.project function performs the following steps :

(3)

Transforms \bold{D_{sup}} into a cross-product matrix \bold{S_{sup}}:

\bold{S_{sup}} = -0.5[\bold{I} - \bold{m}^{T}\bold{1}] \times [\bold{{D_{sup}}^{T}} - \bold{D}\bold{m}\bold{1_{sup}^{T}}],

where \bold{1_{sup}} is an \bold{N_{sup}} by N matrix of ones.

(4)

Transforms \bold{S_{sup}} into a factor matrix \bold{F_{sup}}:

\bold{F_{sup}} = \bold{{S_{sup}}^T}\bold{F}\bold{\Lambda}^{-1}.

\bold{F_{sup}} gives the coordinates of the supplementary elements in the active space.

Value

A object of class 'project', which is a named list of three elements:

coord

a named numeric matrix representing the coordinates of active elements.

group

a named string matrix representing the differents groups of elements and the associate color (Default is 'NoGroup' and 'black').

col

a named string matrix representing, foreach named elements, the associate group and color (Default is 'NoGroup' and 'black).

Note

If sup do not contain names:
A tag "S" followed by an incremented number names the rows of sup.
The columns of sup are named as the rows of mmds$D.

Author(s)

Julien Pele and Jean-Michel Becu

References

Abdi H (2007) Metric multidimensional scaling. In N.J. Salkind (Ed.): Encyclopedia of Measurement and Statistics. Thousand Oaks (CA): Sage. pp. 598-605.

For further reading on projection of supplementary elements:

Gower JC (1968) adding a point to vector diagrams in multivariate analysis. Biometrika 55:582-585.

Trosset MW and Pribe CE (2008) The out-of-sample problem for classical multidimensional scaling. Computational statistics & Data analysis 52:4635-4642.

Pele J, Abdi H, Moreau M, Thybert D and Chabbert M (2011) Multidimensional scaling reveals the main evolutionary pathways of class A G-protein-coupled receptors. PloS ONE 6:e19094.

See Also

cmdscale function from stats package.
dudi.pco, suprow and supcol functions from ade4 package.
PCA function from FactoMineR package.

Examples

# performing metric MDS of human GPCRs with projection of
# GPCRs from D. melanogaster as supplementary elements:
data(gpcr)
active <- gpcr$dif$sapiens.sapiens
sup <- gpcr$dif$melanogaster.sapiens
mmds_active<-mmds(active)
mmds_sup <- mmds.project(mmds_active,sup)

[Package bios2mds version 1.2.3 Index]