Creates a model with random cluster assignments according to the random cluster proportions drawn from a Dirichlet distribution.
The name of the response variable.
The Dirichlet parameters. Either scalar
or of length nClusters
. The higher alpha, the more uniform the clusters will be.
Optional function
for computing the longitudinal cluster centers, with signature (x)
.
The name of the time variable.
The name of the trajectory identification variable.
The number of clusters.
The name of the method.
Additional arguments, such as the seed.
Frigyik BA, Kapila A, Gupta MR (2010). “Introduction to the Dirichlet distribution and related processes.” Technical Report UWEETR-2010-0006, Department of Electrical Engineering, University of Washington.
Other lcMethod implementations:
getArgumentDefaults()
,
getArgumentExclusions()
,
lcMethod-class
,
lcMethodAkmedoids
,
lcMethodCrimCV
,
lcMethodDtwclust
,
lcMethodFeature
,
lcMethodFunFEM
,
lcMethodFunction
,
lcMethodGCKM
,
lcMethodKML
,
lcMethodLMKM
,
lcMethodLcmmGBTM
,
lcMethodLcmmGMM
,
lcMethodMclustLLPA
,
lcMethodMixAK_GLMM
,
lcMethodMixtoolsGMM
,
lcMethodMixtoolsNPRM
,
lcMethodStratify
data(latrendData)
method <- lcMethodRandom(response = "Y", id = "Id", time = "Time")
model <- latrend(method, latrendData)
# uniform clusters
method <- lcMethodRandom(
alpha = 1e3,
nClusters = 3,
response = "Y",
id = "Id",
time = "Time"
)
# single large cluster
method <- lcMethodRandom(
alpha = c(100, 1, 1, 1),
nClusters = 4,
response = "Y",
id = "Id",
time = "Time"
)