Specify mixed mixture regression model using mixtools

lcMethodMixtoolsGMM(
  formula,
  time = getOption("latrend.time"),
  id = getOption("latrend.id"),
  nClusters = 2,
  ...
)

Arguments

formula

Formula, including a random effects component for the trajectory. See lme4::lmer formula syntax.

time

The name of the time variable..

id

The name of the trajectory identifier variable.

nClusters

The number of clusters.

...

Arguments passed to mixtools::regmixEM.mixed. The following arguments are ignored: data, y, x, w, k, addintercept.fixed, verb.

References

Benaglia T, Chauveau D, Hunter DR, Young D (2009). “mixtools: An R Package for Analyzing Finite Mixture Models.” Journal of Statistical Software, 32(6), 1--29. doi:10.18637/jss.v032.i06 .

Examples

# \donttest{
data(latrendData)

if (require("mixtools")) {
  method <- lcMethodMixtoolsGMM(
    formula = Y ~ Time + (1 | Id),
    id = "Id", time = "Time",
    nClusters = 3,
    arb.R = FALSE
  )
}
#> Loading required package: mixtools
#> mixtools package, version 2.0.0, Released 2022-12-04
#> This package is based upon work supported by the National Science Foundation under Grant No. SES-0518772 and the Chan Zuckerberg Initiative: Essential Open Source Software for Science (Grant No. 2020-255193).
#> 
#> Attaching package: ‘mixtools’
#> The following object is masked from ‘package:mclust’:
#> 
#>     dmvnorm
# }