Description Usage Arguments Value Examples
mvp returns profile plot for a longitudinal outcome with repeated measurements. This plot shows the change in variable over the repeated measurements for each subject and the average of all subjects.
1 |
data |
a data frame (or matrix) with n rows for subjects and T columns for the repeated measurements. |
time |
a vector with T equally or unequally spaced time points. |
mean |
a logical indicating whether average response should be plotted. The default is TRUE. |
title |
a character string indicating title of the profile plot. The default is blank. |
xlabel |
a character string indicating label for the x-axis. The default is blank. |
ylabel |
a character string indicating label for the y-axis. The default is blank. |
scol |
color option for lines representing subjects. The default is gray. |
mcol |
color option for the average response. The default is black. |
plot |
logical indicating whether profile plot is returned or not. The default is TRUE. |
lwd.mean |
integer for line width of the average. The default is 2. |
mean.data is the average response.
profile plot if plot is TRUE.
1 2 3 4 5 6 7 8 9 | data(Tcells)
time <- c(0, 2, 4, 6, 8, 18, 24, 32, 48, 72)
j <- 4
n <- 44
gene.names <- c("FYB", "CD69", "IL2RG", "CDC2")
par(mfrow=c(2,2))
for(i in 1:j){
mvp(Tcells[,seq(i, ncol(Tcells), j)],time,mean=TRUE,title=gene.names[i],xlabel="Time points",ylabel="Expression Response",scol="gray",mcol="black",plot=TRUE,lwd.mean=2)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.