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"
)
Run the code above in your browser using DataLab