This function creates a panel which controls the display of data which have a repeated measurement structure across time. Groups, means and standard errors can be displayed. Individual profiles can also be inspected.
rp.rmplot(y, id = NA, timept = NA, fac = NA, type = "all",
xlab = NA, ylab = NA, xlabels = NA, add = FALSE,
lwd = 1, col = NA, lty = NA, panel = TRUE,
panel.plot = TRUE, hscale = NA, vscale = hscale, ...)
a vector, matrix or dataframe of response data. If y is a matrix or dataframe, the rows should correspond to cases and the columns to the repeated measurements.
when y is a vector, id should contain the identifiers for the individual profiles.
when y is a vector, timept
should contain the time value associated with each repeated measurement. When y is a matrix or dataframe timept
may identify the vaues associated with the repeated measurements (columns); in this case the default value is the sequence from 1 to the number of repeated measurements.
an optional factor to split the data into groups.
when the function is not running in interactive panel mode, this character variable determines the type of plot produced. It can be set to "all", "mean", "mean+bar" or "band". The last option is applicable only when there are two groups of data.
the x-axis label.
the y-axis label.
labels for the repeated measurements, to be printed on the x-axis.
a logical variable which determines whether the repeated measurements graph is added to an existing plot. This is only appropriate when panel = FALSE
.
the width of the lines drawn for each repeated measurements profile.
a vector of colours associated with each of the factor levels in fac.
a vector of linetypes associated with each of the factor levels in fac.
a logical variable controlling whether an interactive panel is created.
a logical parameter which determines whether the plot is placed inside the panel (TRUE) or the standard graphics window (FALSE). If the plot is to be placed inside the panel then the tkrplot
library is required.
scaling parameters for the size of the plot when panel.plot
is set to TRUE
. The default values are 1 on Unix platforms and 1.4 on Windows platforms.
further arguments which will be passed to the plot
call
in the construction of the graph.
Nothing is returned.
This function is designed principally for repeated measurements over time, with common time points for each profile. A set of radiobuttons allows all the individual profiles to be plotted, or summaries in the form of means and two standard errors. A checkbox allows the data to be split into groups identified by the variable fac. When there are only two groups, a band can be displayed to indicate time points at which the distance between the observed means is more than two standard errors of the differences between the means.
rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.
# NOT RUN {
LH <- luthor[,2:16]
gp <- factor(luthor[,1])
times <- c(1:5,(5+(1:10)/2))
rp.rmplot(log(LH), fac = gp, timept = times)
# }
Run the code above in your browser using DataLab