latrendData | R Documentation |
An artificial longitudinal dataset comprising 200 trajectories belonging to one of 3 classes. Each trajectory deviates in intercept and slope from its respective class trajectory.
latrendData
A data.frame
comprising longitudinal observations from 200 trajectories.
Each row represents the observed value of a trajectory at a specific moment in time.
integer
: The trajectory identifier.
numeric
: The measurement time, between 0 and 2.
numeric
: The observed value at the respective time Time
for trajectory Id
.
factor
: The reference class.
data(latrendData) head(latrendData) #> Id Time Y Class #> 1 1 0.0000000 -1.08049205 Class 1 #> 2 1 0.2222222 -0.68024151 Class 1 #> 3 1 0.4444444 -0.65148373 Class 1 #> 4 1 0.6666667 -0.39115398 Class 1 #> 5 1 0.8888889 -0.19407876 Class 1 #> 6 1 1.1111111 -0.02991783 Class 1
This dataset was generated using generateLongData.
latrend-data generateLongData
data(latrendData)
if (require("ggplot2")) {
plotTrajectories(latrendData, id = "Id", time = "Time", response = "Y")
# plot according to the reference class
plotTrajectories(latrendData, id = "Id", time = "Time", response = "Y", cluster = "Class")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.