Learn R Programming

⚠️There's a newer version (1.6.1) of this package.Take me there.

latrend (version 1.0.1)

Framework for Clustering Longitudinal Data

Description

A framework for clustering longitudinal datasets in a standardized way. 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.

Copy Link

Version

Install

install.packages('latrend')

Monthly Downloads

421

Version

1.0.1

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Niek Den Teuling

Last Published

November 18th, 2020

Functions in latrend (1.0.1)

$,lcMethod-method

Retrieve and evaluate a lcMethod argument by name
as.lcModels

Convert a list of lcModels to a lcModels list
as.lcMethods

Convert a list of lcMethod objects to a lcMethods list
as.data.frame.lcMethod

Convert lcMethod arguments to a list of atomic types
as.data.frame.lcModels

Generate a data.frame containing the argument values per method per row
clusterNames<-

Update the cluster names
as.data.frame.lcMethods

Convert a list of lcMethod objects to a data.frame
as.list.lcMethod

Extract the method arguments as a list
latrend-assert

latrend-specific assertions
confusionMatrix

Compute the posterior confusion matrix
clusterNames

Get the cluster names
clusterSizes

Number of strata per cluster
clusterTrajectories

Extract the cluster trajectories
estimationTime

Get the model estimation time
clusterProportions

Proportional size of each cluster
evaluate.lcMethod

Substitute the call arguments for their evaluated values
defineExternalMetric

Define an external metric for lcModels
createTestDataFolds

Create all k test folds from the training data
converged

Check model convergence
getInternalMetricDefinition

Get the internal metric definition
createTestDataFold

Create the test fold data for validation
getLcMethod

Get the method specification of a lcModel
defineInternalMetric

Define an internal metric for lcModels
externalMetric,lcModel,lcModel-method

Compute external model metric(s)
fitted.lcModel

Extract lcModel fitted values
idVariable

Extract the trajectory identifier variable
coef.lcModel

Coefficients of a lcModel
lcMethod.call

Create a lcMethod object from a call
lcMethodLongclust

Specify Longclust method
lcMethodAKMedoids

Specify AKMedoids method
lcMethodCrimCV

Specify a zero-inflated repeated-measures GBTM method
getInternalMetricNames

Get the names of the available internal metrics
interface-featureBased

featureBased interface
deviance.lcModel

lcModel deviance
interface-mclust

mclust interface
interface-crimCV

crimCV interface
interface-akmedoids

akmedoids interface
lcMethod-class

lcMethod class
generateLongData

Generate longitudinal test data
lcMethodFlexmix

Method interface to flexmix()
getCall.lcModel

Get the model call
getExternalMetricDefinition

Get the external metric definition
interface-mixAK

mixAK interface
df.residual.lcModel

Extract the residual degrees of freedom from a lcModel
lcMethodCustom

Specify a custom method based on a model function
interface-dtwclust

dtwclust interface
getExternalMetricNames

Get the names of the available external metrics
interface-custom

custom interface
latrend-generics

Method- and model-specific generics defined by the latrend package
createTrainDataFolds

Create the training data for each of the k models in k-fold cross validation evaluation
dcastRepeatedMeasures

Cast a longitudinal data.frame to a matrix
print.lcModels

Print lcModels list concisely
formula.lcMethod

Extract formula
formula.lcModel

Extract the formula of a lcModel
ids

Get the unique ids included in this model
latrendBoot

Cluster longitudinal data using bootstrapping
interface-funFEM

funFEM interface
[[,lcMethod-method

Retrieve and evaluate a lcMethod argument by name
isArgDefined

Check whether the argument of a lcMethod has a defined value.
interface-kml

kml interface
latrend-is

Check if object is of Class
latrend-package

latrend: Framework for Clustering Longitudinal Data
lcApproxModel-class

lcApproxModel class
interface-flexmix

flexmix interface
lcMethodLcmmGMM

Specify GMM method using lcmm
latrendCV

Cluster longitudinal data over k folds
lcMatrixMethod-class

lcMatrixMethod
lcMethodFlexmixGBTM

Group-based trajectory modeling using flexmix
nIds

Number of strata
lcMethodFunFEM

Specify a FunFEM method
nClusters

Number of clusters
getName,lcMethodLcmmGMM-method

lcmm interface
lcModel-make

Cluster-handling functions for lcModel implementations.
lcMethodStratify

Specify a stratification method
lcMethodLMKM

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

longclust interface
plot,lcModel,ANY-method

Plot a lcModel
lcModel-data-filters

Data filters for lcModel
interface-mixtools

mixtools interface
lcMethodDtwclust

Specify time series clustering via dtwclust
lcModelCustom

Specify a model based on a pre-computed result.
lcMethodMixtoolsGMM

Specify mixed mixture regression model using mixtools
latrend

Cluster longitudinal data
lcMethodLcmmGBTM

Specify GBTM method
lcModelWeightedPartition

Create a lcModel with pre-defined weighted partitioning
lcMethodMclustLLPA

Longitudinal latent profile analysis
lcMethodMixAK_GLMM

Specify a GLMM iwht a normal mixture in the random effects
logLik.lcModel

Extract the log-likelihood of a lcModel
lcMethodTwoStep

Two-step clustering
match.call.all

Argument matching with defaults and parent ellipsis expansion
latrendBatch

Cluster longitudinal data for a list of model specifications
plotMetric

Plot one or more internal metrics for all lcModels
metric

Compute internal model metric(s)
min.lcModels

Select the lcModel with the lowest metric value
postprobFromAssignments

Create a posterior probability matrix from a vector of cluster assignments.
predict.lcModel

lcModel predictions
summary.lcModel

Summarize a lcModel
nobs.lcModel

Extract the number of observations from a lcModel
transformFitted

Helper function for ensuring the right fitted() output
lcMethodMixTVEM

Specify a MixTVEM
model.data.lcModel

Extract the model data that was used for fitting
lcMethod

Create a lcMethod object of the specified type and arguments
interface-mixtvem

mixtvem interface
latrendData

Synthetic longitudinal dataset comprising three classes
model.frame.lcModel

Extract model training data
transformLatrendData

Transform latrend input data into the right format
postProbFromObs

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

Construct a flat (named) list of lcModel objects
lcMethodGCKM

Two-step clustering through linear mixed modeling and k-means
latrendRep

Cluster longitudinal data repeatedly
lcMethodMixtoolsNPRM

Specify non-parametric estimation for independent repeated measures
lcMethods

Generate a list of lcMethod objects
lcMethodRandom

Specify a random-partitioning method
qqPlot

Quantile-quantile plot
plotClusterTrajectories

Plot cluster trajectories
lcMethodKML

Specify a longitudinal k-means (KML) method
predictAssignments

Predict the cluster assignments for new trajectories
strip

Strip a lcModel for serialization
predictForCluster

lcModel prediction for a specific cluster
sigma.lcModel

Extract residual standard deviation from a lcModel
transformPredict

Helper function that matches the output to the specified newdata
lcModel-class

lcModel class
max.lcModels

Select the lcModel with the highest metric value
update.lcMethod

Update a method specification
update.lcModel

Update a lcModel
meltRepeatedMeasures

Convert a repeated measures data matrix to a data.frame
postprob

Posterior probability per fitted id
lcModelPartition

Create a lcModel with pre-defined partitioning
residuals.lcModel

Extract lcModel residuals
subset.lcModels

Subsetting a lcModels list based on method arguments
responseVariable

Extract the response variable
timeVariable

Extract the time variable
trajectories

Extract the fitted trajectories for all strata
weighted.meanNA

Weighted arithmetic mean ignoring NAs
trajectoryAssignments

Get the cluster membership of each trajectory
plotTrajectories

Plot trajectories
model.data

Extract the model training data
print.lcMethod

Print the arguments of an lcMethod object
predictPostprob

lcModel posterior probability prediction
which.weight

Sample an index of a vector weighted by the elements
time.lcModel

Sampling times of a lcModel