| ClusterizLongData-class {kml} | R Documentation |
ClusterizLongData is an objet containing trajectories and associated clusterizations.
kml is an algorithm that builds an set of Clusterization from longitudinal data. ClusterizLongData
is the object contaning the original longitudinal data and all the Clusterization that kml finds.
When created, a class ClusterizLongData object simply contains initial data (the trajectories). After the execution of kml, it contains
the original data and the Clusterization which has just been calculated by kml.
Please note that if kml is executed several times, every new Clusterization
are added to the original ones, no pre-existing Clusterization is erased.
id[character]: single identifier
for each of the trajectories, which is to say each individual.time[numeric]: time during which measures were made.traj[array(numeric)]: contains longitudinal data. Each line corresponds to the trajectory of an individual. The columns refer to the time during which measures were made.varName[character]:
Name of the variable measured.trajSizeMin[numeric]:
Trajectories whose values are partially missing can either be
excluded or included in the computation. trajSizeMin sets the
minimum number of values that a trajectory must contain to not be
excluded. For example, if the trajectories have 7 mesurements
(time=7) and trajSizeMin is set to 3, the trajectory
(5,3,NA,4,NA,NA,NA) will be include in the calculation while
(2,NA,NA,NA,4,NA,NA) will be exclude. Please note that trajectories
that are totally missing (i.e. 0 present values) are always excluded.clusters[list(list(Clusterization))]:
clusters contains the list of Clusterization found by
kml. More specifically, clusterizList contains
twenty five items : c1, c2, c3,
c4 up to c25. Each item contains a list of Clusterization: c2 contains the Clusterization having 2 clusters, c3
contains the Clusterization having 3 clusters and so
on. Note that c1
is not used for regular Clusterization but for trajectories
that are artificialy generated, it contain the "true" clusterization, .
Class ClusterizLongData objects can be constructed
via function cld (build from scratch), via
gald (generation of artificial
longitudinal data) or via as.cld
(turning a data.frame into a ClusterizLongData).
id)time)varName)trajSizeMin)traj)Clusterization contain in the object."c3",
the sublist that contain all the Clusterization with 3 clusters.Clusterization off the sublist "c3".Clusterization contain in
the object. The class of Object["calinski"] is
c("calinski","matrix"). The calinski class is used only for
graphical output."c4" sublist."c4" list.valuevalue.value)value.values.value.Clusterization to the corresponding sublist
(the sublist that contain Clusterization with that same number of
clusters that the one curently added), then sorts the sublist by
decreasing Calinski criterion value (highest Calinski firsts).Clusterization with
value clusters.clusters.Object["clusters","add"]<-value.kml is the algorithm that construct a new
Clusterization and add it to the one already calculated.choice enables you to display all the Clusterization
found, to choose some and export them.
Christophe Genolini
PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health
INSERM U669 / Maison de Solenn / Paris
Contact author : <genolini@u-paris10.fr>
Raphaël Ricaud
Laboratoire "Sport & Culture" / "Sports & Culture" Laboratory
University of Paris 10 / Nanterre
Article submited
Web site: http://christophe.genolini.free.fr/kml
Overview: kml-package
Classes : Clusterization, ArtificialLongData
Methods : clusterizLongData, kml, choice, as.clusterizLongData
Plot : plot: overview, plot(ClusterizLongData),
plot(Calinski),
plotSubGroups(ClusterizLongData), plotAll(ClusterizLongData)
showClass("ClusterizLongData")
mat <- matrix(c(1,2,3,1,4,6,1,8,10),3)
ld <- new("ClusterizLongData",id=c("1","2","3"),time=c(2,4,8),varName="Age",traj=mat,trajSizeMin=2)
ld["id"]
ld["time"]<- c(1,3,9)
ld["varName"]
ld["traj"]
ld["traj",3]<-c(2,7,9)
(ld)