Description Usage Arguments Author(s) References Examples

View source: R/Spaghetti.Plot.R

Makes a spaghetti plot, i.e., a plot that depicts the outcome as a function of time for each individual subject.

1 2 |

`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.*

1 2 3 4 5 6 7 8 9 | ```
# 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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.