mvpf: Profile Plot for a Longitudinal Outcome with it's Estimated...

Description Usage Arguments Examples

View source: R/mvpf.R

Description

mvpf returns profile plot for longitudinal outcome. It includes the observed and estimated mean values.

Usage

1
mvpf(data,time,mean.fitted,title="",xlabel="",ylabel="",scol="gray", mcol="black",fcol="red",lwd.mean=2,lwd.fit=2,lty.fit=2)

Arguments

data

a data frame (or matrix) with n rows for subjects and T columns for the repeated measurements.

time

vector with T equally or unequally spaced time points.

mean.fitted

vector with estimated average values.

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.

fcol

color option for the estimated average response. The default is red.

lwd.mean

integer for line width of the average. The default is 2.

lwd.fit

integer for line width of the estimated average. The default is 2.

lty.fit

integer for line width of the estimated average. The default is 2.

  • profile plot with observed and estimated mean values.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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){
data.gene <- Tcells[,seq(i, ncol(Tcells), j)]
mean.gene <- apply(data.gene,2,mean)
 mvpf(data.gene,time,mean.gene,title=gene.names[i],xlabel="Hours",ylabel="Expression Response",scol="gray", mcol="black",fcol="red",lwd.mean=2,lwd.fit = 3,lty.fit =2)
}

priyakohli5/MLGM documentation built on April 24, 2021, 4:22 p.m.