Learn R Programming

kml3d (version 0.6)

ClusterLongData-class: ~ Class: ClusterLongData ~

Description

ClusterLongData is an object containing trajectories and associated clusterizations.

Arguments

Objects from the Class

kml is an algorithm that builds a set of Clustering from longitudinal data (object LongData). ClusterLongData is the object containing the original longitudinal data and all the Clustering that kml finds. When created, an ClusterLongData object simply contains initial data (the trajectories). After the execution of kml, it contains the original data and a ListClustering holding all the Clustering find by kml. Please note that if kml is executed several times, every new Clustering are added to the original ones, no pre-existing Clustering are erased.

Extends

Class LongData, directly. Class ListClustering, directly.

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

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 longData
traj <- 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))

myCld <- clusterLongData(
    traj=traj,
    idAll=as.character(c(100,102,103)),
    time=c(1,2,4,8,15),
    varNames=c("P","A"),
    maxNA=3
)

### Show
myCld

### Get
myCld['varNames']

### Set
myCld['criterionActif']<-"test"

### Plot
plot(myCld)

Run the code above in your browser using DataLab