# NOT RUN {
data(latrendData)
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")
# compute cluster membership based on the mean being below 0
assignments = aggregate(Y ~ Id, latrendData, mean)$Y < 0
plotTrajectories(latrendData,
response = "Y", id = "Id", time = "Time", cluster = assignments)
data(latrendData)
model <- latrend(method = lcMethodKML("Y", id = "Id", time = "Time"), latrendData)
plotTrajectories(model)
# }
Run the code above in your browser using DataLab