Wrapper to the flexmix()
method from the flexmix
package.
lcMethodFlexmix(
formula,
formula.mb = ~1,
time = getOption("latrend.time"),
id = getOption("latrend.id"),
nClusters = 2,
...
)
A formula
specifying the model.
A formula
specifying the class membership model. By default, an intercept-only model is used.
The name of the time variable.
The name of the trajectory identifier variable.
The number of clusters to estimate.
Arguments passed to flexmix::flexmix. The following arguments are ignored: data, concomitant, k.
gruen2008flexmixlatrend
Other lcMethod package interfaces:
lcMethodFlexmixGBTM
# NOT RUN {
library(flexmix)
data(latrendData)
method <- lcMethodFlexmix(Y ~ Time, id = "Id", time = "Time", nClusters = 3)
model <- latrend(method, latrendData)
# }
Run the code above in your browser using DataLab