Learn R Programming

cg (version 1.0-3)

globalTest: Perform a global test of significance

Description

Generic function to perform a global test of significance on a fit by the cg package.

Usage

globalTest(fit, display="print", ...)

Arguments

fit
A fit object created by a fit method from the cg package. The only class of object currently available is cgOneFactorFit, which is prepared by the fit.cgOneFactorData method.
display
One of three valid values:
"print"
The default value; It calls a print method for the created globalTest object, which is formatted text output of the test p-values.

"none"
Supresses any printing. Useful, for example, when just assignment of the resulting object is desired.

"show"
Calls the default showDefault method, which will just print out the globalTest components.

...
Additional arguments, depending on the specific method written for the object. See the method-specific documentation for additional details.

Value

A method-specific globalTest object is returned. See the specific methods for discussion of return values.

See Also

globalTest.cgOneFactorFit

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

data(gmcsfcens) 
gmcsfcens.data <- prepareCGOneFactorData(gmcsfcens, format="groupcolumns",
                                         analysisname="cytokine",
                                         endptname="GM-CSF (pg/ml)",
                                         logscale=TRUE)

gmcsfcens.fit <- fit(gmcsfcens.data, type="aft")

gmcsfcens.globalTest <- globalTest(gmcsfcens.fit)

Run the code above in your browser using DataLab