nIds {latrend} | R Documentation |
Number of trajectories
Description
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.
Usage
nIds(object)
Arguments
object |
The |
Value
An integer
with the number of trajectories on which the lcModel
was fitted.
See Also
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()
Examples
data(latrendData)
method <- lcMethodRandom("Y", id = "Id", time = "Time")
model <- latrend(method, latrendData)
nIds(model)