print.cgPairedDifferenceVarianceTable {cg} | R Documentation |
Print a Paired Difference Variance Table object with some format options
Description
Print a cgPairedDifferenceVarianceTable
object, which contains a table of
variances from a
cgPairedDifferenceFit
object.
Usage
## S4 method for signature 'cgPairedDifferenceVarianceTable'
print(x, digits = NULL, title = NULL, endptname = NULL, ...)
Arguments
x |
A |
digits |
The number of decimal places to use in the output, after any leading
zeroes right of the decimal point.
If |
title |
The title printed out with the table. If |
endptname |
The endpoint name of the data summarized in the table. If NULL, it is set to
the |
... |
Additional arguments. None are currently defined for this method. |
Details
The object is printed using a mix of cat
and print
calls. See
cgPairedDifferenceVarianceTable
for details of the contents
and other object slots.
Two decimal places (after any leading zeroes) are used by default in the display of the variances.
As described in cgPairedDifferenceVarianceTable
, the
table displays a decomposition of the total variance into its
within-experimental unit and between-experimential
unit variance compoments. The variance estimates are provided in the
first column, and the relative percents of these two components are in
the second column. The third column is the square root of the
first column of variances, to provide Spread/StdDev
values in
the units of the endpoint.
Below the printed table is a series of Notes. The first note narrates the estimated gain in sensitivity from using a paired groups design instead of an unpaired groups design. The gains are expressed in terms of reduced experimental unit sample size.
The label portion "experimental unit" in the printed output
is replaced by the expunitname
component of the
settings
slot of the cgPairedDifferenceVarianceTable
object.
Value
print.cgPairedDifferenceVarianceTable
returns
invisible
. The main purpose is the side
effect of printing to the current output connection, which is
typically the console.
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
cgPairedDifferenceVarianceTable
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)
## Next two calls are equivalent
varianceTable(anorexiaFT.fit)
print(varianceTable(anorexiaFT.fit, display="none"))
## A change in title
print(varianceTable(anorexiaFT.fit, display="none"),
title="Estimated Variances")
## Show three digits in display
print(varianceTable(anorexiaFT.fit), digits=3)