Learn R Programming

cg (version 0.9-5)

samplesizeGraph: Graph Estimated Sample Sizes

Description

Generic function to graph a table of estimated sample sizes, using a Sample Size table created by the cg package.

Usage

samplesizeGraph(sstable, Nscale = "log", mmdscale = "log",
 cgtheme=TRUE, device = "single", ...)

Arguments

sstable
A samplesizeTable created by a samplesizeTable method from the cg package.
Nscale
A character indicating whether the y-axis, which shows the estimated samples sizes, should be drawn on the log scale ("log") or the original scale ("original").
mmdscale
A character indicating whether the x-axis, which shows the minimum meaningful differences to be detected, should be drawn on the log scale ("log") or the original scale ("original").
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, depending on the specific method written for the object. See the specific methods for additional details.

Value

  • The main purpose is the side effect of graphing to the current device. See the specific methods for discussion of any return values.

See Also

samplesizeGraph.cgOneFactorSampleSizeTable

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)

canine.samplesize <- samplesizeTable(canine.fit, direction="increasing", 
                                     mmdvec=c(10, 25, 50, 75, 100))

samplesizeGraph(canine.samplesize)

Run the code above in your browser using DataLab