Learn R Programming

cg (version 0.9.0)

qqGraph.cgOneFactorFit: Quantile-Quantile (QQ) Graphs of a cgOneFactorFit object

Description

Create a Q-Q Gaussian graph of the residuals of a cgOneFactorFit object

Usage

## S3 method for class 'cgOneFactorFit':
qqGraph(fit, line=NULL, cgtheme = TRUE, device = "single", \dots)

Arguments

fit
A fit object of class cgOneFactorFit.
line
Add a line through the estimated 25th and 75th percentiles. When set to the default NULL, the addition of a line depends on the following: When there is no censored data, the line will be added with the
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: [object Object],[object Object],[object Object]
...
Additional arguments. One is currently valid: [object Object]

Value

  • qqGraph.cgOneFactorFit returns an invisible NULL. The main purpose, of course, is the side effect of graphing to the current device.

concept

  • quantile-quantile
  • residual diagnostics

Details

For censored data residuals, left-censored values are shown as a shallow "V", which is actually just a rotated downward "<" sign.="" similarly,="" right-censored="" values="" are="" shown="" as="" a="" deeper="" "^",="" which="" is="" rotated="" upwared="" "="">" sign. For the line argument, an added line when censored data residuals are present needs to be interpreted very cautiously. If "too many" censored data values are present, the line will appear nonsensical if indeed it can even be estimated with 25th and 75th percentiles in the presence of the the censored data residuals. These percentiles are estimated via the Kaplan-Meier method as proposed by Gentleman and Crowley (1991), with the survival::survfit function. The heading for the graph is taken from the cgOneFactorData object, which prepareCGOneFactorData sets from its analysisname argument. The label for the Y-axis is taken from the cgOneFactorData object, which prepareCGOneFactorData sets from its endptname argument. The number of decimal places printed in the ticks on the Y-axis is taken from the cgOneFactorData object, which prepareCGOneFactorData sets from its digits argument. The minimum and maximum values from the range of the residuals are respectively labeled in the bottom and top left corners of the graph region.

References

Gentleman, R.C. and Crowley, J. (1991). "Graphical Methods for Censored Data", Journal of the American Statistical Association, Volume 86, 678-683.

See Also

qqline

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)

qqGraph(canine.fit)

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

Run the code above in your browser using DataLab