Equal Variance Graphs assessment of cgOneFactorFit object
Description
Graph residuals of a cgOneFactorFit object to assess equal variance assumption
Usage
1 2 3 
Arguments
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:

Details
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.
Value
varianceGraph.cgOneFactorFit
returns
an invisible NULL
. The main purpose is the side
effect of graphing to the current device.
Note
Contact cg@billpikounis.net for bug reports, questions, concerns, and comments.
Author(s)
Bill Pikounis [aut, cre, cph], John Oleynick [aut], Eva Ye [ctb]
Examples
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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.