| nIds | R Documentation |
Get the number of trajectories (strata) that were used for fitting the given lcModel object.
The number of trajectories is determined from the number of unique identifiers in the training data. In case the trajectory ids were supplied using a factor column, the number of trajectories is determined by the number of levels instead.
nIds(object)
object |
The |
An integer with the number of trajectories on which the lcModel was fitted.
nobs nClusters
Other lcModel functions:
clusterNames(),
clusterProportions(),
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(),
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 <- lcMethodRandom("Y", id = "Id", time = "Time")
model <- latrend(method, latrendData)
nIds(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.