clusterSizes {latrend} | R Documentation |
Number of trajectories per cluster
Description
Obtain the size of each cluster, where the size is determined by the number of assigned trajectories to each cluster.
Usage
clusterSizes(object, ...)
Arguments
object |
The |
... |
Additional arguments passed to |
Details
The cluster sizes are computed from the trajectory cluster membership as decided by the trajectoryAssignments()
function.
Value
A named integer vector
of length nClusters(object)
with the number of assigned trajectories per cluster.
See Also
clusterProportions trajectoryAssignments
Other lcModel functions:
clusterNames()
,
clusterProportions()
,
clusterTrajectories()
,
coef.lcModel()
,
converged()
,
deviance.lcModel()
,
df.residual.lcModel()
,
estimationTime()
,
externalMetric()
,
fitted.lcModel()
,
fittedTrajectories()
,
getCall.lcModel()
,
getLcMethod()
,
ids()
,
lcModel-class
,
metric()
,
model.frame.lcModel()
,
nClusters()
,
nIds()
,
nobs.lcModel()
,
plot-lcModel-method
,
plotClusterTrajectories()
,
plotFittedTrajectories()
,
postprob()
,
predict.lcModel()
,
predictAssignments()
,
predictForCluster()
,
predictPostprob()
,
qqPlot()
,
residuals.lcModel()
,
sigma.lcModel()
,
strip()
,
time.lcModel()
,
trajectoryAssignments()
Examples
data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
model <- latrend(method, latrendData, nClusters = 2)
clusterSizes(model)