Base class used to define a longitudinal cluster method. It is implemented as a wrapper around a call
.
Model estimation is handled through a series of calls implement by the lcMethod
object. The calls are made by latrend, in the following order:
compose
validate
prepareData
preFit
fit
postFit
Extracts the assigned label.
Extracts the name of the given object
.
# S4 method for lcMethod
compose(method, envir = NULL)# S4 method for lcMethod
fit(method, data, envir, verbose)
# S4 method for lcMethod
getLabel(object, ...)
# S4 method for lcMethod
getName(object)
# S4 method for lcMethod
getShortName(object, ...)
# S4 method for lcMethod
length(x)
# S4 method for lcMethod
names(x)
# S4 method for lcMethod
preFit(method, data, envir, verbose)
# S4 method for lcMethod
prepareData(method, data, verbose)
# S4 method for lcMethod
postFit(method, data, model, envir, verbose)
# S4 method for lcMethod
validate(method, data, envir = NULL, ...)
The lcMethod
object.
The environment
in which the lcMethod
should be evaluated
The data, as a data.frame
, on which the model will be trained.
A R.utils::Verbose object indicating the level of verbosity.
The object to extract the label from.
Additional arguments.
The lcMethod
object.
The lcModel
object returned by fit()
.
The updated lcMethod
object.
An lcModel
object.
The extracted label, as character
.
A character vector
of argument names.
An environment
that will be passed to fit()
.
A data.frame
with the post-processed data.
The updated lcModel
object.
Either TRUE
if all validation checks passed,
or a character
containing a description of the failed validation checks.
arguments
A list
representing the arguments of the lcMethod
object. Arguments are not evaluated upon creation of the method object. Instead, arguments are stored similar to a call
object. Do not modify or access.
sourceCalls
A list of calls for tracking the original call after substitution. Used for printing objects which require too many characters (e.g. ,function definitions, matrices).
Because the lcMethod
arguments may be unevaluated, evaluation functions such as [[
accept an envir
argument.
A default environment
can be assigned or obtained from a lcMethod
object using the environment()
function.
Other lcMethod implementations:
lcMethodAkmedoids
,
lcMethodCrimCV
,
lcMethodCustom
,
lcMethodDtwclust
,
lcMethodFeature
,
lcMethodFunFEM
,
lcMethodGCKM
,
lcMethodKML
,
lcMethodLMKM
,
lcMethodLcmmGBTM
,
lcMethodLcmmGMM
,
lcMethodLongclust
,
lcMethodMclustLLPA
,
lcMethodMixAK_GLMM
,
lcMethodMixtoolsGMM
,
lcMethodMixtoolsNPRM
,
lcMethodRandom
,
lcMethodStratify
Other lcMethod functions:
[[,lcMethod-method
,
as.data.frame.lcMethods()
,
as.data.frame.lcMethod()
,
as.lcMethods()
,
as.list.lcMethod()
,
evaluate.lcMethod()
,
formula.lcMethod()
,
update.lcMethod()
# NOT RUN {
getName(lcMethodKML("Y")) # "longitudinal k-means"
getShortName(lcMethodKML("Y")) # "KML"
m = lcMethodKML("Y")
names(m)
# }
Run the code above in your browser using DataLab