print.cgOneFactorComparisonsTable {cg}R Documentation

Print One Factor Comparisons Table object with some format options

Description

Print a cgOneFactorComparisonsTable object, which contains a table of comparisons based on the cgOneFactorFit object.

Usage

## S4 method for signature 'cgOneFactorComparisonsTable'
print(x, digits = NULL, title = NULL, endptname = NULL, ...)

Arguments

x

An cgOneFactorComparisonsTable object, typically created by
comparisonsTable.cgOneFactorFit.

digits

The number of decimal places to use in the output. If NULL, then the number of decimal places is taken from the digits value in the settings slot of the
cgOneFactorComparisonsTable object.

title

The title printed out with the table. If NULL, it is set to be "Comparisons Table of" the analysisname value from the settings slot of the
cgOneFactorComparisonsTable object.

endptname

The endpoint name, printed out with the table. If NULL, it is set to the endptname value from the settings slot of the cgOneFactorComparisonsTable object.

...

Additional arguments. Only one is currently valid:

model

For cgOneFactorComparisonsTable objects that have tables derived from classical least squares lm or resistant & robust rlm fits, the following argument values are possible:

"both"

Both the ordinary classical least squares and resistant robust comparisons tables are printed. This is the default when both fits are present in the cgOneFactorComparisonsTable object specified in the x argument.

"olsonly"

Only the ordinary classical least squares group comparisons table is printed.

"rronly"

Only the resistant & robust comparisons table is printed.

For other possible cgOneFactorComparisonsTable table components such as accelerated failure time or unequal variance models, the model argument is not relevant, and the single table will just be printed for these model types.

Details

The smallest actual p-value that will be printed is 0.001. Anything less than 0.001 will be displayed as < 0.001. If you need more digits, see the cgOneFactorComparisonsTable object.

The object is printed using a mix of cat and print calls. See cgOneFactorComparisonsTable for details of the *.comprs and other object slots.

Value

print.cgOneFactorComparisonsTable 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]

Examples

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.comps0 <- comparisonsTable(canine.fit)

print(canine.comps0, digits=1)

canine.comps1 <- comparisonsTable(canine.fit,  mcadjust=TRUE,
                                  type="allgroupstocontrol", refgrp="CC")

print(canine.comps1, model="olsonly")


[Package cg version 1.0-3 Index]