lcMethodMixTVEM {latrend} | R Documentation |
Specify a MixTVEM
Description
Specify a MixTVEM
Usage
lcMethodMixTVEM(
formula,
formula.mb = ~1,
time = getOption("latrend.time"),
id = getOption("latrend.id"),
nClusters = 2,
...
)
Arguments
formula |
A |
formula.mb |
A |
time |
The name of the time variable. |
id |
The name of the trajectory identifier variable. |
nClusters |
The number of clusters. This replaces the |
... |
Arguments passed to the |
Note
In order to use this method, you must download and source MixTVEM.R. See the reference below.
References
https://github.com/dziakj1/MixTVEM
Dziak JJ, Li R, Tan X, Shiffman S, Shiyko MP (2015). “Modeling intensive longitudinal data with mixtures of nonparametric trajectories and time-varying effects.” Psychological Methods, 20(4), 444–469. ISSN 1939-1463.
Examples
# this example only runs if you download and place MixTVEM.R in your wd
try({
source("MixTVEM.R")
method = lcMethodMixTVEM(
Value ~ time(1) - 1,
time = 'Assessment',
id = "Id",
nClusters = 3
)
})