data(latrendData)
if (require("ggplot2")) {
plotTrajectories(latrendData, response = "Y", id = "Id", time = "Time")
plotTrajectories(
latrendData,
response = quote(exp(Y)),
id = "Id",
time = "Time"
)
plotTrajectories(
latrendData,
response = "Y",
id = "Id",
time = "Time",
cluster = "Class"
)
}
data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
model <- latrend(method, latrendData, nClusters = 3)
if (require("ggplot2")) {
plotTrajectories(model)
}
Run the code above in your browser using DataLab