clusterProportions | R Documentation |
Obtain the proportional size per cluster, between 0 and 1.
clusterProportions(object, ...)
## S4 method for signature 'lcModel'
clusterProportions(object, ...)
object |
The model. |
... |
For |
A named numeric vector
of length nClusters(object)
with the proportional size of each cluster.
By default, the cluster proportions are determined from the cluster-averaged posterior probabilities of the fitted data (as computed by the postprob()
function).
Classes extending lcModel
can override this method to return, for example, the exact estimated mixture proportions based on the model coefficients.
setMethod("clusterProportions", "lcModelExt", function(object, ...) { # return cluster proportion vector })
nClusters clusterNames
clusterSizes postprob
Other lcModel functions:
clusterNames()
,
clusterSizes()
,
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()
data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
model <- latrend(method, latrendData, nClusters = 2)
clusterProportions(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.