View source: R/methodLcmmGMM.R
lcMethodLcmmGMM | R Documentation |
Growth mixture modeling through latent-class linear mixed modeling.
lcMethodLcmmGMM(
fixed,
mixture = ~1,
random = ~1,
classmb = ~1,
time = getOption("latrend.time"),
id = getOption("latrend.id"),
init = "lme",
nClusters = 2,
...
)
fixed |
The fixed effects formula. |
mixture |
The mixture-specific effects formula. See lcmm::hlme for details. |
random |
The random effects formula. See lcmm::hlme for details. |
classmb |
The cluster membership formula for the multinomial logistic model. See lcmm::hlme for details. |
time |
The name of the time variable. |
id |
The name of the trajectory identifier variable. This replaces the |
init |
Alternative for the
The argument is ignored if the |
nClusters |
The number of clusters to fit. This replaces the |
... |
Arguments passed to lcmm::hlme. The following arguments are ignored: data, fixed, random, mixture, subject, classmb, returndata, ng, verbose, subset. |
proustlima2017estimationlatrend
\insertRefproustlima2019lcmmlatrend
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
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.