powered by
Two-step clustering through linear mixed modeling and k-means.
lcMethodGCKM( formula, time = getOption("latrend.time"), id = getOption("latrend.id"), nClusters = 2, center = meanNA, ... )
Formula, including a random effects component for the trajectory. See lme4::lmer formula syntax.
The name of the time variable..
The name of the trajectory identifier variable.
The number of clusters.
Optional function for computing the longitudinal cluster centers, with signature (x).
function
(x)
Arguments passed to lme4::lmer. The following external arguments are ignored: data, centers, trace.
Other lcMethod implementations: lcMethod-class, lcMethodAKMedoids, lcMethodCrimCV, lcMethodCustom, lcMethodDtwclust, lcMethodFunFEM, lcMethodKML, lcMethodLMKM, lcMethodLcmmGBTM, lcMethodLcmmGMM, lcMethodLongclust, lcMethodMclustLLPA, lcMethodMixAK_GLMM, lcMethodMixtoolsGMM, lcMethodMixtoolsNPRM, lcMethodRandom, lcMethodStratify, lcMethodTwoStep
lcMethod-class
lcMethodAKMedoids
lcMethodCrimCV
lcMethodCustom
lcMethodDtwclust
lcMethodFunFEM
lcMethodKML
lcMethodLMKM
lcMethodLcmmGBTM
lcMethodLcmmGMM
lcMethodLongclust
lcMethodMclustLLPA
lcMethodMixAK_GLMM
lcMethodMixtoolsGMM
lcMethodMixtoolsNPRM
lcMethodRandom
lcMethodStratify
lcMethodTwoStep
# NOT RUN { library(lme4) data(latrendData) method <- lcMethodGCKM(Y ~ (Time | Id), id = "Id", time = "Time", nClusters = 3) model <- latrend(method, latrendData) # }
Run the code above in your browser using DataLab