Learn R Programming

kml3d (version 0.6)

matDist3d: ~ Function: matDist3d ~

Description

Compute the distance matrix between joint trajectories.

Usage

matDist3d(data,distance=dist3d)

Arguments

data
[array(numeric)]: Contains the longitudianl data. Each horizontal plan (first dimension) corresponds to the trajectories of an individual. Vertical plans (second dimension) refer to the time at which measures are made. Transve
distance
[numeric <- function(array)]: function used to evaluate the distance between trajectories.

Value

  • A symetric matrix

Author(s)

Christophe Genolini INSERM U669 / PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health Modal'X / Universite Paris Ouest-Nanterre- La Defense Contact author : genolini@u-paris10.fr

Details

Compute the symetric distance matrix between joint trajectories. The distance between individual i and j is at [i,j] or [j,i]

References

Article "KmL: K-means for Longitudinal Data", in Computational Statistics, Volume 25, Issue 2 (2010), Page 317. Web site: http://christophe.genolini.free.fr/kml

Examples

Run this code
### Building an array
tr1 <- array(c(1,2,3,1,4, 3,6,1,8,10, 1,2,1,3,2, 4,2,5,6,3, 4,3,4,4,4, 7,6,5,5,4), dim=c(3,5,2))

### Computing distance matrix
matDist3d(tr1)

Run the code above in your browser using DataLab