Spaghetti.Plot {CorrMixed} | R Documentation |
Makes a spaghetti plot, i.e., a plot that depicts the outcome as a function of time for each individual subject.
Spaghetti.Plot(Dataset, Outcome, Time, Id, Add.Profiles=TRUE, Add.Mean=TRUE, Add.Median=FALSE, Col=8, Lwd.Me=3, xlim, ylim, ...)
Dataset |
A |
Outcome |
The name of the outcome variable. |
Time |
The name of the time indicator. |
Id |
The subject indicator. |
Add.Profiles |
Logical. Should the individual profiles be added? Default |
Add.Mean |
Logical. Should a line that depicts the mean as a function of time be added? Default |
Add.Median |
Logical. Should a line that depicts the medean as a function of time be added? Default |
Col |
The color of the individual profiles. Default |
Lwd.Me |
The line width of the lines with mean and/or median. Default |
xlim |
The (min, max) values for the x-axis. |
ylim |
The (min, max) values for the y-axis. |
... |
Other arguments to be passed to the |
Wim Van der Elst, Geert Molenberghs, Ralf-Dieter Hilgers, & Nicole Heussen
Van der Elst, W., Molenberghs, G., Hilgers, R., & Heussen, N. (2015). Estimating the reliability of repeatedly measured endpoints based on linear mixed-effects models. A tutorial. Submitted.
# Open data data(Example.Data) # Plot individual profiles + mean Spaghetti.Plot(Dataset = Example.Data, Outcome = Outcome, Id=Id, Time = Time) # Plot individual profiles + median Spaghetti.Plot(Dataset = Example.Data, Outcome = Outcome, Id=Id, Time = Time, Add.Mean = FALSE, Add.Median = TRUE)