A spaghettiogram is showing repeated measures (longitudinal data)
spaghettiogram(
formula,
data,
xlim,
ylim,
xlab = "",
ylab = "",
axes = TRUE,
col,
lwd,
lty,
pch,
legend = FALSE,
add = FALSE,
background = TRUE,
...
)
List with data of each subject
A formula which specifies the variables for the spaghettiograms. If Y ~ X + id(Z) then for each value of Z the spaghettiogram is the graph (X,Y) in the subset defined by the value of Z. Data are expected to be in the "long" format. Y is a numeric vector and X is a factor whose levels define the X-axis. Each level of the id-vector corresponds to one line (spaghetti) in the plot.
data set in which variables X, Y and Z are defined.
Limits for x-axis
Limits for y-axis
Label for x-axis
Label for x-axis
Logical indicating if axes should be drawn.
Colors for the spaghettiograms
Widths for the spaghettiograms
Type for the spaghettiograms
Point-type for the spaghettiograms
If TRUE
add a legend. Argument A of legend is
controlled as legend.A. E.g., when legend.cex=2
legend will
be called with argument cex=2.
If TRUE
add to existing plot device.
Control the background color of the graph.
used to transport arguments which are passed to the
following subroutines: "plot"
, "lines"
,
"legend"
, "background"
, "axis1"
,
"axis2"
.
data(SpaceT)
Spaghettiogram(HR~Status+id(ID),
data=SpaceT)
Run the code above in your browser using DataLab