latrend1.6.2 package

A Framework for Clustering Longitudinal Data

APPA

Average posterior probability of assignment (APPA)

as.data.frame.lcMethod

Convert lcMethod arguments to a list of atomic types

as.data.frame.lcMethods

Convert a list of lcMethod objects to a data.frame

as.data.frame.lcModels

Generate a data.frame containing the argument values per method per ro...

as.lcMethods

Convert a list of lcMethod objects to a lcMethods list

as.lcModels

Convert a list of lcModels to a lcModels list

as.list.lcMethod

Extract the method arguments as a list

assert

latrend-specific assertions

clusterNames-set

Update the cluster names

clusterNames

Get the cluster names

clusterProportions

Proportional size of each cluster

clusterSizes

Number of trajectories per cluster

clusterTrajectories

Extract cluster trajectories

coef.lcModel

Extract lcModel coefficients

compose

lcMethod estimation step: compose an lcMethod object

confusionMatrix

Compute the posterior confusion matrix

converged

Check model convergence

createTestDataFold

Create the test fold data for validation

createTestDataFolds

Create all k test folds from the training data

createTrainDataFolds

Create the training data for each of the k models in k-fold cross vali...

defineExternalMetric

Define an external metric for lcModels

defineInternalMetric

Define an internal metric for lcModels

deviance.lcModel

lcModel deviance

df.residual.lcModel

Extract the residual degrees of freedom from a lcModel

dot-defineInternalDistanceMetrics

Define the distance metrics for multiple types at once

dot-guessResponseVariable

Guess the response variable

dot-trajSubset

Select trajectories

estimationTime

Estimation time

evaluate.lcMethod

Substitute the call arguments for their evaluated values

externalMetric

Compute external model metric(s)

fit

lcMethod estimation step: logic for fitting the method to the proces...

fitted.lcModel

Extract lcModel fitted values

fittedTrajectories

Extract the fitted trajectories

formula.lcMethod

Extract formula

formula.lcModel

Extract the formula of a lcModel

generateLongData

Generate longitudinal test data

getArgumentDefaults

Default argument values for the given method specification

getArgumentExclusions

Arguments to be excluded from the specification

getCall.lcModel

Get the model call

getCitation

Get citation info

getExternalMetricDefinition

Get the external metric definition

getExternalMetricNames

Get the names of the available external metrics

getInternalMetricDefinition

Get the internal metric definition

getInternalMetricNames

Get the names of the available internal metrics

getLabel

Object label

getLcMethod

Get the method specification

getName

Object name

ids

Get the trajectory ids on which the model was fitted

idVariable

Extract the trajectory identifier variable

indexy

Retrieve and evaluate a lcMethod argument by name

initialize-lcMethod-method

lcMethod initialization

interface-akmedoids

akmedoids interface

interface-crimCV

crimCV interface

interface-custom

function interface

interface-dtwclust

dtwclust interface

interface-featureBased

featureBased interface

interface-flexmix

flexmix interface

interface-funFEM

funFEM interface

interface-kml

kml interface

interface-lcmm

lcmm interface

interface-mclust

mclust interface

interface-metaMethods

lcMetaMethod abstract class

interface-mixAK

mixAK interface

interface-mixtools

mixtools interface

interface-mixtvem

mixtvem interface

is

Check if object is of Class

isArgDefined

Check whether the argument of a lcMethod has a defined value.

latrend-approaches

High-level approaches to longitudinal clustering

latrend-data

Longitudinal dataset representation

latrend-estimation

Overview of ‘lcMethod’ estimation functions

latrend-generics

Generics used by latrend for different classes

latrend-methods

Supported methods for longitudinal clustering

latrend-metrics

Metrics

latrend-package

latrend: A Framework for Clustering Longitudinal Data

latrend-parallel

Parallel computation using latrend

latrend

Cluster longitudinal data using the specified method

latrendBatch

Cluster longitudinal data for a list of method specifications

latrendBoot

Cluster longitudinal data using bootstrapping

latrendCV

Cluster longitudinal data over k folds

latrendRep

Cluster longitudinal data repeatedly

lcApproxModel-class

lcApproxModel class

lcFitMethods

Method fit modifiers

lcMatrixMethod-class

lcMatrixMethod

lcMethod-class

lcMethod class

lcMethod-estimation

Longitudinal cluster method (lcMethod) estimation procedure

lcMethodAkmedoids

Specify AKMedoids method

lcMethodCrimCV

Specify a zero-inflated repeated-measures GBTM method

lcMethodDtwclust

Specify time series clustering via dtwclust

lcMethodFeature

Feature-based clustering

lcMethodFlexmix

Method interface to flexmix()

lcMethodFlexmixGBTM

Group-based trajectory modeling using flexmix

lcMethodFunction

Specify a custom method based on a function

lcMethodFunFEM

Specify a FunFEM method

lcMethodGCKM

Two-step clustering through latent growth curve modeling and k-means

lcMethodKML

Specify a longitudinal k-means (KML) method

lcMethodLcmmGBTM

Specify GBTM method

lcMethodLcmmGMM

Specify GMM method using lcmm

lcMethodLMKM

Two-step clustering through linear regression modeling and k-means

lcMethodMclustLLPA

Longitudinal latent profile analysis

lcMethodMixAK_GLMM

Specify a GLMM iwht a normal mixture in the random effects

lcMethodMixtoolsGMM

Specify mixed mixture regression model using mixtools

lcMethodMixtoolsNPRM

Specify non-parametric estimation for independent repeated measures

lcMethodMixTVEM

Specify a MixTVEM

lcMethodRandom

Specify a random-partitioning method

lcMethods

Generate a list of lcMethod objects

lcMethodStratify

Specify a stratification method

lcModel-class

lcModel class

lcModel-data-filters

Data filters for lcModel

lcModel-make

Cluster-handling functions for lcModel implementations.

lcModel

Longitudinal cluster result (‘lcModel’ )

lcModelPartition

Create a lcModel with pre-defined partitioning

lcModels-class

lcModels: a list of lcModel objects

lcModels

Construct a list of lcModel objects

lcModelWeightedPartition

Create a lcModel with pre-defined weighted partitioning

logLik.lcModel

Extract the log-likelihood of a lcModel

match.call.all

Argument matching with defaults and parent ellipsis expansion

max.lcModels

Select the lcModel with the highest metric value

meanNA

Mean ignoring NAs

metric

Compute internal model metric(s)

min.lcModels

Select the lcModel with the lowest metric value

model.data.lcModel

Extract the model data that was used for fitting

model.data

Extract the model training data

model.frame.lcModel

Extract model training data

names-lcMethod-method

lcMethod argument names

nClusters

Number of clusters

nIds

Number of trajectories

nobs.lcModel

Number of observations used for the lcModel fit

OCC

Odds of correct classification (OCC)

plot-lcModel-method

Plot a lcModel

plot-lcModels-method

Grid plot for a list of models

plotClusterTrajectories

Plot cluster trajectories

plotFittedTrajectories

Plot the fitted trajectories

plotMetric

Plot one or more internal metrics for all lcModels

plotTrajectories

Plot the data trajectories

postFit

lcMethod estimation step: logic for post-processing the fitted lcMod...

postprob

Posterior probability per fitted trajectory

postprobFromAssignments

Create a posterior probability matrix from a vector of cluster assignm...

postProbFromObs

Compute the id-specific postprob matrix from a given observation-level...

predict.lcModel

lcModel predictions

predictAssignments

Predict the cluster assignments for new trajectories

predictForCluster

Predict trajectories conditional on cluster membership

predictPostprob

Posterior probability for new data

preFit

lcMethod estimation step: method preparation logic

prepareData

lcMethod estimation step: logic for preparing the training data

print.lcMethod

Print the arguments of an lcMethod object

print.lcModels

Print lcModels list concisely

qqPlot

Quantile-quantile plot

residuals.lcModel

Extract lcModel residuals

responseVariable

Extract response variable

sigma.lcModel

Extract residual standard deviation from a lcModel

strip

Reduce the memory footprint of an object for serialization

subset.lcModels

Subsetting a lcModels list based on method arguments

summary.lcModel

Summarize a lcModel

test.latrend

Test the implementation of an lcMethod and associated lcModel subclass...

test

Test a condition

time.lcModel

Sampling times of a lcModel

timeVariable

Extract the time variable

trajectories

Get the trajectories

trajectoryAssignments

Get the cluster membership of each trajectory

transformFitted

Helper function for custom lcModel classes implementing fitted.lcModel...

transformPredict

Helper function for custom lcModel classes implementing predict.lcMode...

tsframe

Convert a multiple time series matrix to a data.frame

tsmatrix

Convert a longitudinal data.frame to a matrix

update.lcMethod

Update a method specification

update.lcModel

Update a lcModel

validate

lcMethod estimation step: method argument validation logic

weighted.meanNA

Weighted arithmetic mean ignoring NAs

which.weight

Sample an index of a vector weighted by the elements

A framework for clustering longitudinal datasets in a standardized way. The package provides an interface to existing R packages for clustering longitudinal univariate trajectories, facilitating reproducible and transparent analyses. Additionally, standard tools are provided to support cluster analyses, including repeated estimation, model validation, and model assessment. The interface enables users to compare results between methods, and to implement and evaluate new methods with ease. The 'akmedoids' package is available from <https://github.com/MAnalytics/akmedoids>.

  • Maintainer: Niek Den Teuling
  • License: GPL (>= 2)
  • Last published: 2025-07-04