Represents an arbitrary partitioning of a set of trajectories. As such, this model has no predictive capabilities. The cluster trajectories are represented by the specified center function (mean by default).
lcModelPartition(
data,
response,
trajectoryAssignments,
nClusters = NA,
center = meanNA,
clusterNames = NULL,
time = getOption("latrend.time"),
id = getOption("latrend.id"),
name = "part",
envir = parent.frame()
)A data.frame representing the trajectory data.
The name of the response variable.
A vector of cluster membership per trajectory, either factor, or integer (1 to nClusters).
The number of clusters. Optional for factor assignments.
The function for computing the longitudinal cluster centers, used for representing the cluster trajectories.
The names of the clusters, or a function with input n outputting a character vector of names.
The name of the time variable.
The name of the trajectory identification variable.
The name of the method.
The environment associated with the model. Used for evaluating the assigned data object by model.data.lcModel.