Step3Clusters {traj} | R Documentation |
Classify the Longitudinal Data Based on the Selected Measures.
Description
Classifies the trajectories by applying the k-means clustering
algorithm to the measures selected by Step2Selection
.
Usage
Step3Clusters(
trajSelection,
nclusters = NULL,
nstart = 200,
iter.max = 100,
K.max = 8,
B = 500,
d.power = 2,
spaceH0 = "scaledPCA",
method = "Tibs2001SEmax",
SE.factor = 1
)
## S3 method for class 'trajClusters'
print(x, ...)
## S3 method for class 'trajClusters'
summary(object, ...)
Arguments
trajSelection |
object of class |
nclusters |
either NULL or the desired number of clusters. If NULL, the
number of clustersis determined using the GAP criterion as implemented in
the |
nstart |
to be passed to the |
iter.max |
to be passed to the |
K.max |
to be passed to the |
B |
to be passed to the |
d.power |
to be passed to the |
spaceH0 |
to be passed to the |
method |
to be passed to the |
SE.factor |
to be passed to the |
x |
object of class trajClusters |
... |
further arguments passed to or from other methods. |
object |
object of class trajClusters |
Value
An object of class trajClusters
; a list containing the result
of the clustering, the output of the clusGap
function, as well as a
curated form of the arguments.
See Also
Examples
## Not run:
data("trajdata")
trajdata.noGrp <- trajdata[, -which(colnames(trajdata) == "Group")] #remove the Group column
m = Step1Measures(trajdata.noGrp, ID = TRUE, measures = 1:18)
s = Step2Selection(m)
s$RC$loadings
s2 = Step2Selection(m, select = c(3, 13, 11, 15))
c3.part <- Step3Clusters(s2, nclusters = 3)$partition
c4.part <- Step3Clusters(s2, nclusters = 4)$partition
c5.part <- Step3Clusters(s2, nclusters = 5)$partition
## End(Not run)