lcMethodFlexmixGBTM: Group-based trajectory modeling using flexmix

View source: R/methodFlexmixGBTM.R

lcMethodFlexmixGBTMR Documentation

Group-based trajectory modeling using flexmix

Description

Fits a GBTM based on the flexmix::FLXMRglm driver.

Usage

lcMethodFlexmixGBTM(
  formula,
  formula.mb = ~1,
  time = getOption("latrend.time"),
  id = getOption("latrend.id"),
  nClusters = 2,
  ...
)

Arguments

formula

A formula specifying the model.

formula.mb

A formula specifying the class membership model. By default, an intercept-only model is used.

time

The name of the time variable.

id

The name of the trajectory identifier variable.

nClusters

The number of clusters to estimate.

...

Arguments passed to flexmix::flexmix or flexmix::FLXMRglm. The following arguments are ignored: data, k, trace.

References

\insertRef

gruen2008flexmixlatrend

See Also

Other lcMethod package interfaces: lcMethodFlexmix

Examples

data(latrendData)
if (require("flexmix")) {
  method <- lcMethodFlexmixGBTM(Y ~ Time, id = "Id", time = "Time", nClusters = 3)
  model <- latrend(method, latrendData)
}

latrend documentation built on March 31, 2023, 5:45 p.m.