Specify a MixTVEM
A formula
excluding the time component. Time-invariant covariates are detected automatically as these are a special case in MixTVEM.
A formula
for cluster-membership prediction. Covariates must be time-invariant. Furthermore, the formula must contain an intercept.
The name of the time variable.
The name of the trajectory identifier variable.
The number of clusters. This replaces the numClasses
argument of the TVEMMixNormal
function call.
Arguments passed to the TVEMMixNormal()
function.
The following optional arguments are ignored: doPlot, getSEs, numClasses.
In order to use this method, you must download and source MixTVEM.R. See the reference below.
# \donttest{
# 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
)
})
#> Warning: cannot open file 'MixTVEM.R': No such file or directory
#> Error in file(filename, "r", encoding = encoding) :
#> cannot open the connection
# }