Learn R Programming

cg (version 1.0-3)

varianceGraph: Variance Graphs

Description

Create an equal variance assessment graph of the residuals of a fitted object from the cg package

Usage

varianceGraph(fit, trend = NULL, cgtheme = TRUE, device = "single", ...)

Arguments

fit
A fit object, typically created by the fit generic function.
trend
Add a trend line to help assess the trend of the residuals. See specific method written for the fit argument.
cgtheme
When set to the default TRUE, ensures a trellis device is active with limited color scheme. Namely background, strip.shingle, and strip.background are each set to "white".
device
Can be one of three values:

"single"
The default, which will put all graphs on the same device page.

"multiple"
Relevant only when multiple fitted models are present in the fit object and requested to be plotted. In those cases, a new graphics device is generated to hold each additional plot beyond the first.

"ask"
Relevant only when multiple fitted models are present in the fit object and requested to be plotted. In these cases, each plot is portrayed as a single-paneled graph, with the ask=TRUE argument specified in par so that the user input confirmation is needed before the graphs are drawn.

...
Additional arguments, depending on the specific method written for the object. See the method-specific documentation for additional details.

Value

varianceGraph returns an invisible NULL. The main purpose is the side effect of graphing to the current device.

Details

The graphs plot the square root of the absolute value of the residuals against the fitted value. The notion of using the squared root of the absolute residuals is attributed to John Tukey.

See Also

varianceGraph.cgOneFactorFit

Examples

Run this code
data(canine)
canine.data <- prepareCGOneFactorData(canine, format="groupcolumns",
                                      analysisname="Canine",
                                      endptname="Prostate Volume",
                                      endptunits=expression(plain(cm)^3),
                                      digits=1, logscale=TRUE, refgrp="CC")
canine.fit <- fit(canine.data)

varianceGraph(canine.fit)

varianceGraph(canine.fit, model="olsonly")

Run the code above in your browser using DataLab