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
1 2  ## 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 adhoc,
which is essentially to refit a linear model with lm()
and weights
from the resistant & robust fit. This adhoc 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.gpval
The pvalue of a global F test applied to the
olsfit
component of thecgOneFactorFit
object, unlessmodel="rronly"
is specified. Will not be appropriate in the case where a validaftfit
component is present in thecgOneFactorFit
object.rr.gpval
The pvalue of an adhoc global test applied to the
rrfit
component of thecgOneFactorFit
object, if a valid resistant & robust fit object is present. See the Details section above. Ifrrfit
is a simple character value of"No fit was selected."
, ormodel="olsonly"
was specified, then the value isNULL
.aft.gpval
The pvalue of a global chisquare test applied to the
aftfit
component of thecgOneFactorFit
object if a valid accelerated failure time fit object is present. Ifaftfit
is a simple character value of"No fit was selected."
, then the value isNULL
.uv.gpval
The pvalue of a global F test applied to the
uvfit
component of thecgOneFactorFit
object 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26  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="GMCSF (pg/ml)",
logscale=TRUE)
gmcsfcens.fit < fit(gmcsfcens.data, type="aft")
globalTest(gmcsfcens.fit)
