Learn R Programming

latrend (version 1.1.0)

lcMethodLcmmGBTM: Specify GBTM method

Description

Group-based trajectory modeling through fixed-effects modeling.

Usage

lcMethodLcmmGBTM(
  fixed,
  mixture = ~1,
  classmb = ~1,
  time = getOption("latrend.time"),
  id = getOption("latrend.id"),
  nClusters = 2,
  ...
)

Arguments

fixed

The fixed effects formula.

mixture

The mixture-specific 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 subject argument of lcmm::hlme.

nClusters

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.

References

proustlima2017estimationlatrend

proustlima2019lcmmlatrend

See Also

Other lcMethod implementations: lcMethod-class, lcMethodAkmedoids, lcMethodCrimCV, lcMethodCustom, lcMethodDtwclust, lcMethodFeature, lcMethodFunFEM, lcMethodGCKM, lcMethodKML, lcMethodLMKM, lcMethodLcmmGMM, lcMethodLongclust, lcMethodMclustLLPA, lcMethodMixAK_GLMM, lcMethodMixtoolsGMM, lcMethodMixtoolsNPRM, lcMethodRandom, lcMethodStratify

Examples

Run this code
# NOT RUN {
data(latrendData)
method <- lcMethodLcmmGBTM(fixed = Y ~ Time, mixture = ~ 1,
   id = "Id", time = "Time", nClusters = 3)
gbtm <- latrend(method, data = latrendData)
summary(gbtm)

method <- lcMethodLcmmGBTM(fixed = Y ~ Time, mixture = ~ Time,
    id = "Id", time = "Time", nClusters = 3)
# }

Run the code above in your browser using DataLab