Learn R Programming

longitudinalData (version 2.3)

Partition-class: ~ Class: Partition ~

Description

An object of class Partition is a partition of a population into subgroups. The object also contains some information like the percentage of trajectories in each group or some qualities criterion.

Arguments

Objects from the Class

Objects are mainly intend to be created by some clustering methods (like k-means, fuzzy k-means, mixture modeling, latent class analysis,...)

validation rules

A class Partition object must follow some rules to be valid:
  • Slots should be either all empty, or all non empty.
  • nbClustershas to be lower or equal to 26.
  • clustersis a factor inLETTERS[1:nbCluster].

Construction

Class Partition objects are mainly constructed by some clustering methods (like k-means, fuzzy k-means, mixture modeling, latent class analysis,...). Neverdeless, it is also possible to construct them from scratch using the fonction partition.

Author

Christophe Genolini 1. UMR U1027, INSERM, Universit� Paul Sabatier / Toulouse III / France 2. CeRSME, EA 2931, UFR STAPS, Universit� de Paris Ouest-Nanterre-La D�fense / Nanterre / France

References

[1] C. Genolini and B. Falissard "KmL: k-means for longitudinal data" Computational Statistics, vol 25(2), pp 317-328, 2010 [2] C. Genolini and B. Falissard "KmL: A package to cluster longitudinal data" Computer Methods and Programs in Biomedicine, 104, pp e112-121, 2011

See Also

Overview: longitudinalData-package Classes: LongData Methods: partition

Examples

Run this code
############
### Building Partition

### number
part <- partition(rep(c(1,2,1,3),time=3))

### LETTERS
part <- partition(rep(c("A","B","D"),time=4),details=c(convergenceTime="3",multiplicity="1"))

### Others don't work
try(partition(rep(c("A","Bb","C"),time=3)))

#############
### Setteur and Getteur

### '['
part["clusters"]
part["clustersAsInteger"]
part["nbClusters"]

### '[<-'
part["multiplicity"] <- 2
(part)

Run the code above in your browser using DataLab