plot
Three plots (selectable by which
) are currently available:
a plot for the fitted model (which
=1), a plot for the individual mean profile (which
=2)
and a plot for the observed data and the corresponded mean profile
(which
=3).
# S4 method for cold,missing
plot(x,which=c(1:3),xlab=NULL,ylab=NULL,
main=NULL,factor,subSET,ident=FALSE,
caption=c("Individual mean profiles"),cex.caption=1)
an object of class cold
.
if a subset of the plots is required, specify a subset of the numbers 1:3. Default is (which
=1).
label to plots.
label to plots.
identify the factor for which
=1.
title to plots in addition to the caption.
logical expression indicating elements to keep in individual mean profile plots: missing values are taken as FALSE
for which
=2.
logical expression indicating whether or not to add the number of the subject to individual mean profile plots.
The ident
argument is for option which
=2.
captions to appear above the plots.
controls the size of caption.
signature(x="ANY", y="ANY")
:Generic function.
signature(x="cold", y="missing")
:Plot diagnostics for cold
object.
# NOT RUN {
##### data= datacold
### AR1R
mod1R <- cold(z ~ Time * Treatment, data = datacold, time = "Time",
id = "Subject", dependence = "AR1R")
plot(mod1R, which = 1, xlab = "Time(weeks)", ylab = "Count",
factor = Treatment, main = "Model AR1R")
plot(mod1R, which = 2, xlab = "Time(weeks)", ylab = "Count",
main = "Model AR1R")
par(mfrow = c(1, 2))
plot(mod1R, which = 2, ident = TRUE, subSET = Treatment == "0",
ylab = "Count", main = "0")
plot(mod1R, which = 2, ident = TRUE, subSET = Treatment == "1",
ylab = "Count", main = "1")
par(mfrow = c(1, 1))
par(mfrow = c(2, 2))
plot(mod1R, which = 3, subSET = (id == c(2)), xlab = "Time (weeks)",
ylab = "count", main = "0_Subject2")
plot(mod1R, which = 3, subSET = (id == c(10)), xlab = "Time (weeks)",
ylab = "Count", main = "0_Subject10")
plot(mod1R, which = 3, subSET = (id == c(26)), xlab = "Time (weeks)",
ylab = "Count", main = "1_Subject26")
plot(mod1R, which=3, subSET=(id == c(30)), xlab = "Time (weeks)",
ylab = "Count", main = "1_Subject32")
par(mfrow = c(1, 1))
# }
Run the code above in your browser using DataLab