Description Usage Arguments Details Value Note Author(s) Examples
Graph residuals of a cgOneFactorFit object to assess equal variance assumption
1 2 3 
fit 
A fit object of class 
trend 
Add a trend line. When set to the default 
cgtheme 
When set to the default 
device 
Can be one of three values:

... 
Additional arguments. Two are currently valid:

The graph plots the square root of the absolute value of the residuals against the fitted value. The square root spacing on the yaxis has tick marks in the fitted scale. The notion of using the squared root of the absolute residuals is attributed to John Tukey.
The values are automatically jittered to minimize overlapping points. For censored data, leftcensored values are shown as a shallow "V", which is actually just a rotated downward "<" sign. Similarly, rightcensored values are shown as a deeper "^", which is a rotated upward ">" sign.
For the trend
argument, an added trend line when censored data residuals
are present needs to be interpreted cautiously. When there are 7 or more
groups, a cubic smoothing spline based on VGAM::vgam
is fit; otherwise, the group means of the residuals are estimated with
an accelerated failure time model and then just connected. If "too many"
censored data values are present, the line may be withheld and
warnings will be issued, or if forced with line=TRUE
, for
example, may appear nonsensical.
The heading for the graph is taken from the cgOneFactorData
object,
which prepareCGOneFactorData
sets from its analysisname
argument.
The label for the Yaxis is taken from the cgOneFactorData
object,
which prepareCGOneFactorData
sets from its endptname
argument.
The number of decimal places printed in the ticks on the Yaxis is taken
from the cgOneFactorData
object,
which prepareCGOneFactorData
sets from its digits
argument.
The minimum and maximum values from the range of the absolute valued residuals are respectively labeled in the bottom and top left corners of the graph region.
If group labels along the xaxis seem to overlap in the standard horizontal form, they will be rotated 45 degrees.
varianceGraph.cgOneFactorFit
returns
an invisible NULL
. The main purpose is the side
effect of graphing to the current device.
Contact [email protected] for bug reports, questions, concerns, and comments.
Bill Pikounis [aut, cre, cph], John Oleynick [aut], Eva Ye [ctb]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28  ## From running examples of cgOneFactorData objects
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")
gmcsfcens.data < prepareCGOneFactorData(gmcsfcens, format="groupcolumns",
analysisname="cytokine",
endptname="GMCSF (pg/ml)",
logscale=TRUE,
digits=1)
gmcsfcens.fit < fit(gmcsfcens.data, type="aft")
varianceGraph(gmcsfcens.fit, trend=TRUE)
varianceGraph(gmcsfcens.fit) ## will yield a warning message why no line
## is graphed
varianceGraph(gmcsfcens.fit, trend=FALSE)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.