samplesizeGraph.cgPairedDifferenceSampleSizeTable {cg} | R Documentation |
Graph estimated sample sizes from a cgPairedDifferenceSampleSizeTable object
Description
Creates a graph to see estimated sample sizes in a cgPairedDifferenceSampleSizeTable object.
Usage
## S4 method for signature 'cgPairedDifferenceSampleSizeTable'
samplesizeGraph(sstable, Nscale, mmdscale, ...)
Arguments
sstable |
A sample size object of class |
Nscale |
A |
mmdscale |
A |
... |
Additional arguments. Two are currently valid:
|
Details
The minimum and maximum experimental unit sample size values are added inside the plot region in blue, flush against the y-axis in the top and bottom left corners.
Tick marks are attempted to be chosen wisely. For log-scaled axes in
particular, leading digits of 2, 5, and 10 for values are included if
possible. Since the algorithm is empirical, the ticklabels
argument is available for further refinement or complete replacement
of tickmarks.
The method essentially portrays in a graph the same information shown
by the print method of the
cgPairedDifferenceSampleSizeTable
object.
Value
samplesizeGraph.cgPairedDifferenceSampleSizeTable
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]
See Also
cgPairedDifferenceSampleSizeTable
Examples
data(anorexiaFT)
anorexiaFT.data <- prepareCGPairedDifferenceData(anorexiaFT, format="groupcolumns",
analysisname="Anorexia FT",
endptname="Weight",
endptunits="lbs",
expunitname="Patient",
digits=1,
logscale=TRUE)
anorexiaFT.fit <- fit(anorexiaFT.data)
## The interest is in increased weight for the anorexia FT
## (family treatment) group of patients
anorexiaFT.samplesize <- samplesizeTable(anorexiaFT.fit, direction="increasing",
mmdvec=c(5, 10, 15, 20)) ## print method shows table
samplesizeGraph(anorexiaFT.samplesize)
samplesizeGraph(anorexiaFT.samplesize, nticklabels=list(mod="add", marks=3))