Growth mixture modeling through latent-class linear mixed modeling.
The fixed effects formula.
The mixture-specific effects formula. See lcmm::hlme for details.
The random effects formula. See lcmm::hlme for details.
The cluster membership formula for the multinomial logistic model. See lcmm::hlme for details.
The name of the time variable.
The name of the trajectory identifier variable. This replaces the subject
argument of lcmm::hlme.
Alternative for the B
argument of lcmm::hlme, for initializing the hlme fitting procedure.
This is only applicable for nClusters > 1
.
Options:
"lme.random"
(default): random initialization through a standard linear mixed model. Assigns a fitted standard linear mixed model enclosed in a call to random() to the B
argument.
"lme"
, fits a standard linear mixed model and passes this to the B
argument.
"gridsearch"
, a gridsearch is used with initialization from "lme.random"
, following the approach used by lcmm::gridsearch. To use this initalization, specify arguments gridsearch.maxiter
(max number of iterations during search), gridsearch.rep
(number of fits during search), and gridsearch.parallel
(whether to enable parallel computation).
NULL
or "default"
, the default lcmm::hlme input for B
is used.
The argument is ignored if the B
argument is specified, or nClusters = 1
.
The number of clusters to fit. This replaces the ng
argument of lcmm::hlme.
Arguments passed to lcmm::hlme. The following arguments are ignored: data, fixed, random, mixture, subject, classmb, returndata, ng, verbose, subset.
proustlima2017estimationlatrend
proustlima2019lcmmlatrend
Other lcMethod implementations:
getArgumentDefaults()
,
getArgumentExclusions()
,
lcMethod-class
,
lcMethodAkmedoids
,
lcMethodCrimCV
,
lcMethodDtwclust
,
lcMethodFeature
,
lcMethodFunFEM
,
lcMethodFunction
,
lcMethodGCKM
,
lcMethodKML
,
lcMethodLMKM
,
lcMethodLcmmGBTM
,
lcMethodMclustLLPA
,
lcMethodMixAK_GLMM
,
lcMethodMixtoolsGMM
,
lcMethodMixtoolsNPRM
,
lcMethodRandom
,
lcMethodStratify
data(latrendData)
if (rlang::is_installed("lcmm")) {
method <- lcMethodLcmmGMM(
fixed = Y ~ Time,
mixture = ~ Time,
random = ~ 1,
id = "Id",
time = "Time",
nClusters = 2
)
gmm <- latrend(method, data = latrendData)
summary(gmm)
# define method with gridsearch
method <- lcMethodLcmmGMM(
fixed = Y ~ Time,
mixture = ~ Time,
random = ~ 1,
id = "Id",
time = "Time",
nClusters = 3,
init = "gridsearch",
gridsearch.maxiter = 10,
gridsearch.rep = 50,
gridsearch.parallel = TRUE
)
}