Description Objects from the Class Slots Construction Get [ Methods Author References See Also Examples
LongData3d
is an objet containing joint longitudinal
data and some associate value (like time, individual
identifiant,...).
Object LongData3d
can be created using
the fonction longData3d
on a data.frame
or on an array
.
idAll
[vector(character)]
: Single identifier
for each of the longData3d (each individual). Usefull to export clusters.
idFewNA
[vector(character)]
: Restriction of
idAll
to the trajectories that does not have 'too many' missing
value. See maxNA
for 'too many' definition.
time
[numeric]
: Time at which measures are made.
varNames
[vector(character)]
: Names of the variable measured.
traj
[array(numeric)]
: Contains
the joint variable-trajectories. Each horizontal plan (first
dimension) corresponds to the joint-trajectories of an
individual. Vertical plans (second dimension) refer to the time at which measures
are made. Transversal plans (the third dimension) are for variables.
dimTraj
[vector3(numeric)]
: size of the array
traj
(ie dimTraj=c(length(idFewNA),length(time),length(varNames))
).
maxNA
[numeric]
or [vector(numeric)]
:
Individual whose trajectories contain 'too many' missing value
are exclude from traj
and will no be use in
the analysis. Their identifier is preserved in idAll
but
not in idFewNA
. 'too many' is define by maxNA
: a
trajectory with more missing than maxNA
is exclude.
When maxNA
is a single number, it is
recycled for all the variables.
reverse
[matrix(numeric)]
: if the trajectories
are scale using the function scale
, the 'scaling
parameters' (probably mean and standard deviation) are saved in
reverse
. This is usefull to restore the original data after a
scaling operation.
LongData3d
can be created by calling
the fonction longData3d
on a data.frame
or on an array
.
[vecteur(character)]: Gets the full list of individual
identifiant (the value of the slot idAll
)
[vecteur(character)]: Gets the list of individual
identifiant with not too many missing values (the value of the slot idFewNA
)
[character]: Gets the name(s) of the variable (the value of the slot varNames
)
[vecteur(numeric)]: Gets the times (the value of the slot time
)
[array(numeric)]: Gets all the joint trajectories (the value of the slot traj
)
[vector3(numeric)]: Gets the dimension of traj
.
[numeric]: Gets the first dimension of
traj
(ie the number of individual include in the analysis).
[numeric]: Gets the second dimension of
traj
(ie the number of time measurement).
[numeric]: Gets the third dimension of
traj
(ie the number of variables).
[vecteur(numeric)]: Gets maxNA.
[matrix(numeric)]: Gets the matrix of the scaling parameters.
scale
scale the trajectories. Usefull to normalize variable trajectories measured with different units.
restoreRealData
restore original data that have been modified after a scaling operation.
longDataFrom3d
Create a
LongData
by extracting a single variable trajectory
form a dataset of joint variable-trajectories.
plotTrajMeans
plot all the variable of the LongData3d
, optionnaly according to a Partition
.
plotTrajMeans3d
plot two variables of the LongData3d
in
a 3 dimensions graph, optionnaly according to a Partition
.
plot3dPdf
create 'Triangle objects' representing in
3D the cluster's center according to a
Partition
. 'Triangle object' can latter be
include in a LaTeX file to get a dynamique (rotationg) pdf
figure.
imputation
Impute the missing values of the trajectories.
qualityCriterion
Compute some quality criterion that
can be use to compare the quality of differents Partition
.
Christophe Genolini
1. UMR U1027, INSERM, Universit<e9> Paul Sabatier / Toulouse III / France
2. CeRSME, EA 2931, UFR STAPS, Universit<e9> de Paris Ouest-Nanterre-La D<e9>fense / Nanterre / France
[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
Overview: longitudinalData-package
Methods: LongData
, longData3d
, imputation
, qualityCriterion
Plot: plotTrajMeans
,
plotTrajMeans3d
, plot3dPdf
1 2 3 4 5 6 7 8 9 10 11 12 13 | #################
### building joint trajectories
dn <- data.frame(id=1:3,v1=c(11,14,16),t1=c(1,5,7),v2=c(12,10,13),t2=c(2,5,0),t3=c(3,6,8))
(ld <- longData3d(dn,timeInData=list(Vir=c(2,4,NA),Tes=c(3,5,6))))
### Scaling
scale(ld)
(ld)
### Plotting
plotTrajMeans3d(ld)
restoreRealData(ld)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.