latrendBoot: Cluster longitudinal data using bootstrapping

Description Usage Arguments Value See Also Examples

View source: R/latrend.R

Description

Performs bootstrapping, generating samples from the given data at the id level, fitting a lcModel to each sample.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
latrendBoot(
  method,
  data,
  samples = 50,
  seed = NULL,
  parallel = FALSE,
  errorHandling = "stop",
  envir = NULL,
  verbose = getOption("latrend.verbose")
)

Arguments

method

The lcMethod object specifying the longitudinal cluster method to apply.

data

A data.frame.

samples

The number of bootstrap samples to evaluate.

seed

The seed to use. Optional.

parallel

Whether to enable parallel evaluation. See latrend-parallel.

errorHandling

Whether to "stop" on an error, or to "remove' evaluations that raised an error.

envir

The environment in which to evaluate the method arguments. Note that this only applies to data when data is a call.

verbose

The level of verbosity. Either an object of class Verbose (see R.utils::Verbose for details), a logical indicating whether to show basic computation information, a numeric indicating the verbosity level (see Verbose), or one of c('info', 'fine', 'finest').

Value

A lcModels object of length samples.

See Also

Other longitudinal cluster fit functions: latrendBatch(), latrendCV(), latrendRep(), latrend()

Other validation methods: createTestDataFolds(), createTestDataFold(), createTrainDataFolds(), latrendCV(), lcModel-data-filters

Examples

1
2
3
data(latrendData)
method <- lcMethodKML("Y", id = "Id", time = "Time")
model <- latrendBoot(method, latrendData, samples = 10)

latrend documentation built on April 14, 2021, 5:08 p.m.