cmdsFit {htSeqTools} | R Documentation

## Classical Multi-Dimensional Scaling for a distance matrix

### Description

`cmdsFit` obtains coordinates in a `k` dimensional space which best approximate the given distances between objects.

### Usage

    cmdsFit(d, k=2, type='classic', add=FALSE, cor.method='pearson')

### Arguments

`d` | Distances between objects
`k` | Dimensionality of the reconstructed space, typically set to 2 or 3.
`type` | Set to `"classic"` to perform classical MDS (uses function `cmdscale` from package `stats`). Set to `"isoMDS"` to use Kruskal's non-metric MDS (uses function `isoMDS` from package `MASS`).
`add` | Logical indicating if an additive constant c* should be computed, and added to the non-diagonal dissimilarities such that all n-1 eigenvalues are non-negative in `cmdscale`
`cor.method` | A character string indicating which correlation coefficient (or covariance) is to be computed. One of "pearson" (default), "kendall", or "spearman", can be abbreviated.

### Value

The function returns a `cmdsFit` object. See help("cmdsFit-class") for details.

### Methods

`signature(d = "matrix")`

  Use Classical Multi-Dimensional Scaling to represent points in a k-dimensional space.

### Examples

    ### Not run
    #d <- matrix(c(0,5,10,5,0,15,10,15,0),byrow=TRUE,ncol=3)
    #cmdsFit(d,add=TRUE)

[Package htSeqTools version 1.28.3 Index]