calculTrajFuzzyMean | R Documentation |
Given some longitudinal data and a group's membership,
calculFuzzyMean
computes the mean trajectories of each cluster.
calculTrajFuzzyMean(traj, fuzzyClust)
traj |
|
fuzzyClust |
|
Given a matrix of individual membership, the function
calculTrajFuzzyMean
compute the mean trajectory of each
clusters.
affectFuzzyIndiv
used with calculTrajFuzzyMean
simulates one fuzzy k-means step.
A matrix with k line and t column containing k clusters centers. Each line is a center, each column is a time measurement.
#######################
### calculTrajFuzzyMean
### Some LongitudinalData
traj <- gald()["traj"]
### 4 clusters centers
center <- traj[runif(4,1,nrow(traj)),]
### Affectation of each individual
membership <- affectFuzzyIndiv(traj,center)
### Computation of the mean's trajectories
calculTrajFuzzyMean(traj,membership)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.