plot-methods {cold}R Documentation

Methods for function plot

Description

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).

Usage

## S4 method for signature '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)

Arguments

x

an object of class cold.

which

if a subset of the plots is required, specify a subset of the numbers 1:3. Default is (which=1).

xlab

label to plots.

ylab

label to plots.

factor

identify the factor for which=1.

main

title to plots in addition to the caption.

subSET

logical expression indicating elements to keep in individual mean profile plots: missing values are taken as FALSE for which=2.

ident

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.

caption

captions to appear above the plots.

cex.caption

controls the size of caption.

Methods

signature(x="ANY", y="ANY"):

Generic function.

signature(x="cold", y="missing"):

Plot diagnostics for cold object.

Examples

#####  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))


[Package cold version 2.0-3 Index]