| globalTest.cgOneFactorFit {cg} | R Documentation |
Perform a global Test of significance with cgOneFactorFit object
Description
Performs a global test based on the cgOneFactorFit object, to assess whether there are any significant differences amongst levels of the factor, i.e. amongst the groups. A cgOneFactorGlobalTest class object is created.
Usage
## S4 method for signature 'cgOneFactorFit'
globalTest(fit, display="print", ...)
Arguments
fit |
A fit object of class |
display |
One of three valid values:
|
... |
Additional arguments. Only one is currently valid:
For other possible |
Details
The notion of a global F test, or equivalently, of R^2,
for resistant & robust linear models is
murky, as no clear theoretical analogue to the ordinary classical
least squares approach exists. The approach taken here is ad-hoc,
which is essentially to re-fit a linear model with lm() and weights
from the resistant & robust fit. This ad-hoc approach is taken when
there are 3 or more groups.
If there are only 2 groups, then the comparisonsTable.cgOneFactorFit
method is used with the rlm() model component.
Value
Creates an object of class cgOneFactorGlobalTest, with the
following slots:
ols.gpvalThe p-value of a global F test applied to the
olsfitcomponent of thecgOneFactorFitobject, unlessmodel="rronly"is specified. Will not be appropriate in the case where a validaftfitcomponent is present in thecgOneFactorFitobject.rr.gpvalThe p-value of an ad-hoc global test applied to the
rrfitcomponent of thecgOneFactorFitobject, if a valid resistant & robust fit object is present. See the Details section above. Ifrrfitis a simple character value of"No fit was selected.", ormodel="olsonly"was specified, then the value isNULL.aft.gpvalThe p-value of a global chi-square test applied to the
aftfitcomponent of thecgOneFactorFitobject if a valid accelerated failure time fit object is present. Ifaftfitis a simple character value of"No fit was selected.", then the value isNULL.uv.gpvalThe p-value of a global F test applied to the
uvfitcomponent of thecgOneFactorFitobject if a valid unequal variances fit object is present.
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.globalTest <- globalTest(canine.fit)
globalTest(canine.fit, model="both")
globalTest(canine.fit, model="olsonly")
globalTest(canine.fit, model="rronly")
data(gmcsfcens)
gmcsfcens.data <- prepareCGOneFactorData(gmcsfcens, format="groupcolumns",
analysisname="cytokine",
endptname="GM-CSF (pg/ml)",
logscale=TRUE)
gmcsfcens.fit <- fit(gmcsfcens.data, type="aft")
globalTest(gmcsfcens.fit)