Cluster longitudinal data over k folds
Apply k-fold cross validation for internal cluster validation. Creates k random subsets ("folds") from the data, estimating a model for each of the k-1 combined folds.
latrendCV( method, data, folds = 10, seed = NULL, parallel = FALSE, errorHandling = "stop", envir = NULL, verbose = getOption("latrend.verbose") )
method |
The |
data |
A |
folds |
The number of folds. Ten folds by default. |
seed |
The seed to use. Optional. |
parallel |
Whether to enable parallel evaluation. See latrend-parallel. |
errorHandling |
Whether to |
envir |
The |
verbose |
The level of verbosity. Either an object of class |
A lcModels
object of containing the folds
training models.
Other longitudinal cluster fit functions:
latrendBatch()
,
latrendBoot()
,
latrendRep()
,
latrend()
Other validation methods:
createTestDataFolds()
,
createTestDataFold()
,
createTrainDataFolds()
,
latrendBoot()
,
lcModel-data-filters
data(latrendData) method <- lcMethodKML("Y", id = "Id", time = "Time") model <- latrendCV(method, latrendData, folds = 5) model <- latrendCV(method, subset(latrendData, Time < .5), folds = 5, seed = 1)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.