Learn R Programming

kml3d (version 2.3)

ClusterLongData3d-class: ~ Class: ClusterLongData3d ~

Description

ClusterLongData3d is an object containing joint-trajectories and associated Partition.

Arguments

Objects from the Class

kml3d is an algorithm that builds a set of Partition from joint longitudinal data. ClusterLongData3d is the object containing the original joint longitudinal data and all the Partition that kml3d finds. When created, an ClusterLongData3d object simply contains initial data (the joint-trajectories). After the execution of kml3d, it contains the original data and the Partition which has just been find by kml3d. Note that if kml3d is executed several times, every new Partition are added to the original ones, no pre-existing Partition is erased.

Extends

Class LongData3d, directly. Class ListPartition, directly.

Special thanks

Special thanks to Boris Hejblum for debugging the '[' and '[<-' operators (the previous version was not compatible with the matrix package, which is used by lme4).

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 <- clusterLongData3d(
    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']<-"Davies.Bouldin"

### Plot
plot(myCld)

Run the code above in your browser using DataLab